Thanks @dkayiwa . On extending BaseModuleContextSensitiveTest ,
//This works fine
@Autowired
@Qualifier("patientService")
PatientService service;
//This still fails out
PatientService service = Context.getPatientService();
The problem could be this, you’re defining 2 value and ref tags and am not 100% sure if spring can automatically know which value tag is related to a given ref tag, can you try separating them? Basically create 2 child beans where the parent is serviceContext i.e one for each service
Nice! @samuel34 sometimes it’s good to mention the change you made to get it to work so that others who run into the same issue in the future and come across this post can know the fix.