PHCUserDetailsFetcher extends ANMDetailsFetcher { @Override public List<SP_ANM> fetchDetails(String anmIdentifier) { return anmService.anmsInTheSamePHC(anmIdentifier); } @Autowired protected  PHCUserDetailsFetcher(ANMService anmService); @Override List<SP_ANM> fetchDetails(String anmIdentifier);  }
@Test public void shouldDelegateToANMServiceToFetchANMsFromSamePHC() { phcUserDetailsFetcher.fetchDetails("demo1"); verify(anmService).anmsInTheSamePHC("demo1"); }