@Test public void shouldGetCountOfSearchResults() throws Exception { String searchParam = "fac"; String column = "facility"; when(mapper.getSearchedSupplyLinesCount(searchParam, column)).thenReturn(1); Integer result = repository.getTotalSearchResultCount(searchParam, column); assertThat(result, is(1)); verify(mapper).getSearchedSupplyLinesCount(searchParam, column); }
public Integer getTotalSearchResultCount(String searchParam, String column) { return mapper.getSearchedSupplyLinesCount(searchParam, column); }
SupplyLineRepository { public Integer getTotalSearchResultCount(String searchParam, String column) { return mapper.getSearchedSupplyLinesCount(searchParam, column); } }
SupplyLineRepository { public Integer getTotalSearchResultCount(String searchParam, String column) { return mapper.getSearchedSupplyLinesCount(searchParam, column); }  }
SupplyLineRepository { public Integer getTotalSearchResultCount(String searchParam, String column) { return mapper.getSearchedSupplyLinesCount(searchParam, column); }  void insert(SupplyLine supplyLine); SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void update(SupplyLine supplyLine); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getSupplyLineByFacilityProgram(Long facilityId, Long programId); }
SupplyLineRepository { public Integer getTotalSearchResultCount(String searchParam, String column) { return mapper.getSearchedSupplyLinesCount(searchParam, column); }  void insert(SupplyLine supplyLine); SupplyLine getSupplyLineBy(SupervisoryNode supervisoryNode, Program program); void update(SupplyLine supplyLine); SupplyLine getById(Long id); List<SupplyLine> search(String searchParam, String column, Pagination pagination); Integer getTotalSearchResultCount(String searchParam, String column); List<Facility> getSupplyingFacilities(Long userId); SupplyLine getSupplyLineByFacilityProgram(Long facilityId, Long programId);  }