@Test public void shouldGetProcessingScheduleByZoneAndProgram() throws Exception { ProcessingSchedule expectedSchedule = new ProcessingSchedule(); Long scheduleId = 3l; expectedSchedule.setId(scheduleId); when(repository.getProcessingScheduleByZoneAndProgram(1l, 2l)).thenReturn(expectedSchedule); ProcessingSchedule processingSchedule = service.getProcessingScheduleByZoneAndProgram(1l, 2l); assertThat(processingSchedule, is(expectedSchedule)); verify(repository).getProcessingScheduleByZoneAndProgram(1l, 2l); }
public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) { return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId); }
DeliveryZoneProgramScheduleService { public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) { return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId); } }
DeliveryZoneProgramScheduleService { public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) { return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId); }  }
DeliveryZoneProgramScheduleService { public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) { return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId); }  void save(DeliveryZoneProgramSchedule deliveryZoneProgramSchedule); DeliveryZoneProgramSchedule getByDeliveryZoneCodeAndProgramCode(String deliveryZoneCode, String programCode); List<Long> getProgramIdsForDeliveryZones(Long deliveryZoneId); List<ProcessingPeriod> getPeriodsForDeliveryZoneAndProgram(Long zoneId, Long programId); List<ProcessingPeriod> getPeriodsForDeliveryZoneAndProgram(Long zoneId, Long programId, Date finalPeriodBeginningDate); ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId); }
DeliveryZoneProgramScheduleService { public ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId) { return repository.getProcessingScheduleByZoneAndProgram(zoneId, programId); }  void save(DeliveryZoneProgramSchedule deliveryZoneProgramSchedule); DeliveryZoneProgramSchedule getByDeliveryZoneCodeAndProgramCode(String deliveryZoneCode, String programCode); List<Long> getProgramIdsForDeliveryZones(Long deliveryZoneId); List<ProcessingPeriod> getPeriodsForDeliveryZoneAndProgram(Long zoneId, Long programId); List<ProcessingPeriod> getPeriodsForDeliveryZoneAndProgram(Long zoneId, Long programId, Date finalPeriodBeginningDate); ProcessingSchedule getProcessingScheduleByZoneAndProgram(long zoneId, long programId);  }