@Test public void shouldGetTotalSearchResultCount() throws Exception { when(repository.getTotalSearchResultCount(1l, 2l, "f10")).thenReturn(10); Integer result = service.getTotalSearchResultCount(1l, 2l, "f10"); assertThat(result, is(10)); }
public Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam) { return repository.getTotalSearchResultCount(facilityTypeId, programId, searchParam); }
FacilityApprovedProductService { public Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam) { return repository.getTotalSearchResultCount(facilityTypeId, programId, searchParam); } }
FacilityApprovedProductService { public Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam) { return repository.getTotalSearchResultCount(facilityTypeId, programId, searchParam); }  }
FacilityApprovedProductService { public Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam) { return repository.getTotalSearchResultCount(facilityTypeId, programId, searchParam); }  List<FacilityTypeApprovedProduct> getFullSupplyFacilityApprovedProductByFacilityAndProgram(Long facilityId, Long programId); List<FacilityTypeApprovedProduct> getNonFullSupplyFacilityApprovedProductByFacilityAndProgram(Long facilityId, Long programId); void save(FacilityTypeApprovedProduct facilityTypeApprovedProduct); FacilityTypeApprovedProduct getFacilityApprovedProductByProgramProductAndFacilityTypeCode(FacilityTypeApprovedProduct facilityTypeApprovedProduct); List<FacilityTypeApprovedProduct> getAllBy(Long facilityTypeId, Long programId, String searchParam, Pagination pagination); Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam); void saveAll(List<FacilityTypeApprovedProduct> facilityTypeApprovedProducts, Long userId); void delete(Long id); }
FacilityApprovedProductService { public Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam) { return repository.getTotalSearchResultCount(facilityTypeId, programId, searchParam); }  List<FacilityTypeApprovedProduct> getFullSupplyFacilityApprovedProductByFacilityAndProgram(Long facilityId, Long programId); List<FacilityTypeApprovedProduct> getNonFullSupplyFacilityApprovedProductByFacilityAndProgram(Long facilityId, Long programId); void save(FacilityTypeApprovedProduct facilityTypeApprovedProduct); FacilityTypeApprovedProduct getFacilityApprovedProductByProgramProductAndFacilityTypeCode(FacilityTypeApprovedProduct facilityTypeApprovedProduct); List<FacilityTypeApprovedProduct> getAllBy(Long facilityTypeId, Long programId, String searchParam, Pagination pagination); Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam); void saveAll(List<FacilityTypeApprovedProduct> facilityTypeApprovedProducts, Long userId); void delete(Long id); static final String FACILITY_TYPE_DOES_NOT_EXIST; static final String FACILITY_APPROVED_PRODUCT_DOES_NOT_EXIST; }