@Test public void shouldGetRegimenColumnsByProgramId() throws Exception { Long programId = 1L; RegimenColumn regimenColumn1 = new RegimenColumn(programId, "testName1", "testLabel1", "numeric", Boolean.TRUE,1, 1L); RegimenColumn regimenColumn2 = new RegimenColumn(programId, "testName2", "testLabel2", "numeric", Boolean.TRUE,2, 1L); when(repository.getRegimenColumnsByProgramId(programId)).thenReturn(asList(regimenColumn1, regimenColumn2)); List<RegimenColumn> resultColumns = service.getRegimenColumnsByProgramId(programId); verify(repository).getRegimenColumnsByProgramId(programId); assertThat(resultColumns.size(), is(2)); assertThat(resultColumns.get(0), is(regimenColumn1)); assertThat(resultColumns.get(1), is(regimenColumn2)); }
public List<RegimenColumn> getRegimenColumnsByProgramId(Long programId) { return repository.getRegimenColumnsByProgramId(programId); }
RegimenColumnService { public List<RegimenColumn> getRegimenColumnsByProgramId(Long programId) { return repository.getRegimenColumnsByProgramId(programId); } }
RegimenColumnService { public List<RegimenColumn> getRegimenColumnsByProgramId(Long programId) { return repository.getRegimenColumnsByProgramId(programId); }  }
RegimenColumnService { public List<RegimenColumn> getRegimenColumnsByProgramId(Long programId) { return repository.getRegimenColumnsByProgramId(programId); }  void save(RegimenTemplate regimenTemplate, Long userId); List<RegimenColumn> getRegimenColumnsByProgramId(Long programId); RegimenTemplate getRegimenTemplateOrMasterTemplate(Long programId); RegimenTemplate getRegimenTemplateByProgramId(Long programId); List<RegimenColumn> getRegimenColumnsForPrintByProgramId(Long programId); }
RegimenColumnService { public List<RegimenColumn> getRegimenColumnsByProgramId(Long programId) { return repository.getRegimenColumnsByProgramId(programId); }  void save(RegimenTemplate regimenTemplate, Long userId); List<RegimenColumn> getRegimenColumnsByProgramId(Long programId); RegimenTemplate getRegimenTemplateOrMasterTemplate(Long programId); RegimenTemplate getRegimenTemplateByProgramId(Long programId); List<RegimenColumn> getRegimenColumnsForPrintByProgramId(Long programId);  }