@Test public void shouldGetActiveProgramsSupportedByFacilityId() throws Exception { Long facilityId = 1L; List<ProgramSupported> programSupported = asList(new ProgramSupported()); when(repository.getActiveByFacilityId(facilityId)).thenReturn(programSupported); List<ProgramSupported> activeProgramSupported = service.getActiveByFacilityId(facilityId); verify(repository).getActiveByFacilityId(facilityId); assertThat(activeProgramSupported, equalTo(programSupported)); }
public List<ProgramSupported> getActiveByFacilityId(Long facilityId) { return repository.getActiveByFacilityId(facilityId); }
ProgramSupportedService { public List<ProgramSupported> getActiveByFacilityId(Long facilityId) { return repository.getActiveByFacilityId(facilityId); } }
ProgramSupportedService { public List<ProgramSupported> getActiveByFacilityId(Long facilityId) { return repository.getActiveByFacilityId(facilityId); }  }
ProgramSupportedService { public List<ProgramSupported> getActiveByFacilityId(Long facilityId) { return repository.getActiveByFacilityId(facilityId); }  List<ProgramSupported> getAllByFacilityId(Long facilityId); void updateSupportedPrograms(Facility facility); ProgramSupported getFilledByFacilityIdAndProgramId(Long facilityId, Long programId); ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId); void uploadSupportedProgram(ProgramSupported programSupported); ProgramSupported getProgramSupported(ProgramSupported programSupported); void notifyProgramSupportedUpdated(Facility facility); List<ProgramSupported> getActiveByFacilityId(Long facilityId); void updateForVirtualFacilities(Facility parentFacility); }
ProgramSupportedService { public List<ProgramSupported> getActiveByFacilityId(Long facilityId) { return repository.getActiveByFacilityId(facilityId); }  List<ProgramSupported> getAllByFacilityId(Long facilityId); void updateSupportedPrograms(Facility facility); ProgramSupported getFilledByFacilityIdAndProgramId(Long facilityId, Long programId); ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId); void uploadSupportedProgram(ProgramSupported programSupported); ProgramSupported getProgramSupported(ProgramSupported programSupported); void notifyProgramSupportedUpdated(Facility facility); List<ProgramSupported> getActiveByFacilityId(Long facilityId); void updateForVirtualFacilities(Facility parentFacility);  }