@Test public void shouldGetTotalSearchResultCount() throws Exception { String searchParam = "fac"; String column = "facility"; when(repository.getTotalSearchResultCount(searchParam, column)).thenReturn(1); Integer result = service.getTotalSearchResultCount(searchParam, column); assertThat(result, is(1)); verify(repository).getTotalSearchResultCount(searchParam, column); }
public Integer getTotalSearchResultCount(String searchParam, String column) { return repository.getTotalSearchResultCount(searchParam, column); }
SupplyLineService { public Integer getTotalSearchResultCount(String searchParam, String column) { return repository.getTotalSearchResultCount(searchParam, column); } }
SupplyLineService { public Integer getTotalSearchResultCount(String searchParam, String column) { return repository.getTotalSearchResultCount(searchParam, column); }  }
SupplyLineService { public Integer getTotalSearchResultCount(String searchParam, String column) { return repository.getTotalSearchResultCount(searchParam, column); }  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 Integer getTotalSearchResultCount(String searchParam, String column) { return repository.getTotalSearchResultCount(searchParam, column); }  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);  }