@Test public void shouldReturnProgramSupported() throws Exception { ProgramSupported expectedProgram = new ProgramSupported(); when(repository.getByFacilityIdAndProgramId(1L, 2L)).thenReturn(expectedProgram); ProgramSupported programSupported = service.getByFacilityIdAndProgramId(1L, 2L); assertThat(programSupported, is(expectedProgram)); verify(repository).getByFacilityIdAndProgramId(1L, 2L); }
public ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId) { return repository.getByFacilityIdAndProgramId(facilityId, programId); }
ProgramSupportedService { public ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId) { return repository.getByFacilityIdAndProgramId(facilityId, programId); } }
ProgramSupportedService { public ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId) { return repository.getByFacilityIdAndProgramId(facilityId, programId); }  }
ProgramSupportedService { public ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId) { return repository.getByFacilityIdAndProgramId(facilityId, programId); }  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 ProgramSupported getByFacilityIdAndProgramId(Long facilityId, Long programId) { return repository.getByFacilityIdAndProgramId(facilityId, programId); }  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);  }