@Test public void shouldGetAScheduleById() throws Exception { ProcessingSchedule mockedProcessingSchedule = mock(ProcessingSchedule.class); when(processingScheduleMapper.get(1L)).thenReturn(mockedProcessingSchedule); ProcessingSchedule fetchedSchedule = repository.get(1L); assertThat(fetchedSchedule, is(mockedProcessingSchedule)); }
public ProcessingSchedule get(Long id) { return processingScheduleMapper.get(id); }
ProcessingScheduleRepository { public ProcessingSchedule get(Long id) { return processingScheduleMapper.get(id); } }
ProcessingScheduleRepository { public ProcessingSchedule get(Long id) { return processingScheduleMapper.get(id); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); }
ProcessingScheduleRepository { public ProcessingSchedule get(Long id) { return processingScheduleMapper.get(id); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); List<ProcessingSchedule> getAll(); void create(ProcessingSchedule processingSchedule); ProcessingSchedule get(Long id); void update(ProcessingSchedule processingSchedule); ProcessingSchedule getByCode(String code); }
ProcessingScheduleRepository { public ProcessingSchedule get(Long id) { return processingScheduleMapper.get(id); } @Autowired  ProcessingScheduleRepository(ProcessingScheduleMapper processingScheduleMapper); List<ProcessingSchedule> getAll(); void create(ProcessingSchedule processingSchedule); ProcessingSchedule get(Long id); void update(ProcessingSchedule processingSchedule); ProcessingSchedule getByCode(String code);  }