SCUserDetailsFetcher extends ANMDetailsFetcher { @Override public List<SP_ANM> fetchDetails(String anmIdentifier) { return anmService.anmsInTheSameSC(anmIdentifier); } @Autowired  SCUserDetailsFetcher(ANMService anmService); @Override List<SP_ANM> fetchDetails(String anmIdentifier);  }
@Test public void shouldDelegateToANMServiceToFetchANMsFromSameSC() { scUserDetailsFetcher.fetchDetails("demo1"); verify(anmService).anmsInTheSameSC("demo1"); }