@Test public void shouldGetProgramStartDate() throws Exception { Date programStartDate = now().toDate(); when(programSupportedRepository.getProgramStartDate(1L, 2L)).thenReturn(programStartDate); assertThat(service.getProgramStartDate(1L, 2L), is(programStartDate)); }
public Date getProgramStartDate(Long facilityId, Long programId) { return programSupportedRepository.getProgramStartDate(facilityId, programId); }
ProgramService { public Date getProgramStartDate(Long facilityId, Long programId) { return programSupportedRepository.getProgramStartDate(facilityId, programId); } }
ProgramService { public Date getProgramStartDate(Long facilityId, Long programId) { return programSupportedRepository.getProgramStartDate(facilityId, programId); }  }
ProgramService { public Date getProgramStartDate(Long facilityId, Long programId) { return programSupportedRepository.getProgramStartDate(facilityId, programId); }  List<Program> getByFacility(Long facilityId); List<Program> getAllPullPrograms(); List<Program> getAllPushPrograms(); List<Program> getAllIvdPrograms(); List<Program> getProgramsSupportedByUserHomeFacilityWithRights(Long facilityId, Long userId, String... rightNames); List<Program> getIvdProgramsSupportedByUserHomeFacilityWithRights(Long facilityId, Long userId, String... rightNames); List<Program> getProgramForSupervisedFacilities(Long userId, String... rightNames); List<Program> getIvdProgramForSupervisedFacilities(Long userId, String... rightNames); Long getIdForCode(String code); Date getProgramStartDate(Long facilityId, Long programId); Program getById(Long id); void setTemplateConfigured(Long id); List<Program> getProgramsForUserByFacilityAndRights(Long facilityId, Long userId, String... rightNames); List<Program> getAll(); Program getByCode(String code); void setRegimenTemplateConfigured(Long programId); void setFeedSendFlag(Program program, Boolean sendFeed); void save(Program program); void notifyProgramChange(); Program getValidatedProgramByCode(String programCode); Program update(Program program); List<Program> getProgramsForUserByRights(Long userId, String rightName); }
ProgramService { public Date getProgramStartDate(Long facilityId, Long programId) { return programSupportedRepository.getProgramStartDate(facilityId, programId); }  List<Program> getByFacility(Long facilityId); List<Program> getAllPullPrograms(); List<Program> getAllPushPrograms(); List<Program> getAllIvdPrograms(); List<Program> getProgramsSupportedByUserHomeFacilityWithRights(Long facilityId, Long userId, String... rightNames); List<Program> getIvdProgramsSupportedByUserHomeFacilityWithRights(Long facilityId, Long userId, String... rightNames); List<Program> getProgramForSupervisedFacilities(Long userId, String... rightNames); List<Program> getIvdProgramForSupervisedFacilities(Long userId, String... rightNames); Long getIdForCode(String code); Date getProgramStartDate(Long facilityId, Long programId); Program getById(Long id); void setTemplateConfigured(Long id); List<Program> getProgramsForUserByFacilityAndRights(Long facilityId, Long userId, String... rightNames); List<Program> getAll(); Program getByCode(String code); void setRegimenTemplateConfigured(Long programId); void setFeedSendFlag(Program program, Boolean sendFeed); void save(Program program); void notifyProgramChange(); Program getValidatedProgramByCode(String programCode); Program update(Program program); List<Program> getProgramsForUserByRights(Long userId, String rightName);  }