@Test public void shouldGetSupplyLineById() throws Exception { SupplyLine expectedSupplyLine = new SupplyLine(); when(repository.getById(3L)).thenReturn(expectedSupplyLine); SupplyLine returnedSupplyLine = service.getById(3L); assertThat(returnedSupplyLine, is(expectedSupplyLine)); verify(repository).getById(3L); }
public SupplyLine getById(Long id) { return repository.getById(id); }
SupplyLineService { public SupplyLine getById(Long id) { return repository.getById(id); } }
SupplyLineService { public SupplyLine getById(Long id) { return repository.getById(id); }  }
SupplyLineService { public SupplyLine getById(Long id) { return repository.getById(id); }  SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void save(SupplyLine supplyLine); SupplyLine getExisting(SupplyLine supplyLine); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); SupplyLine getByFacilityProgram(Long facilityId, Long programId); }
SupplyLineService { public SupplyLine getById(Long id) { return repository.getById(id); }  SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void save(SupplyLine supplyLine); SupplyLine getExisting(SupplyLine supplyLine); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); SupplyLine getByFacilityProgram(Long facilityId, Long programId);  }