@Test public void shouldInsertAFacilitySupportedProduct() { FacilityTypeApprovedProduct facilityTypeApprovedProduct = new FacilityTypeApprovedProduct(); ProgramProduct programProduct = new ProgramProduct(); programProduct.setId(1L); facilityTypeApprovedProduct.setProgramProduct(programProduct); facilityTypeApprovedProduct.setFacilityType(new FacilityType("warehouse")); when(mapper.getBy(1L, "warehouse")).thenReturn(null); repository.insert(facilityTypeApprovedProduct); verify(mapper).insert(facilityTypeApprovedProduct); }
public void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct) { mapper.insert(facilityTypeApprovedProduct); }
FacilityApprovedProductRepository { public void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct) { mapper.insert(facilityTypeApprovedProduct); } }
FacilityApprovedProductRepository { public void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct) { mapper.insert(facilityTypeApprovedProduct); }  }
FacilityApprovedProductRepository { public void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct) { mapper.insert(facilityTypeApprovedProduct); }  List<FacilityTypeApprovedProduct> getFullSupplyProductsByFacilityAndProgram(Long facilityId, Long programId); List<FacilityTypeApprovedProduct> getNonFullSupplyProductsByFacilityAndProgram(Long facilityId, Long programId); void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct); void update(FacilityTypeApprovedProduct facilityTypeApprovedProduct); FacilityTypeApprovedProduct getFacilityApprovedProductByProgramProductAndFacilityTypeCode(
    FacilityTypeApprovedProduct facilityTypeApprovedProduct); List<FacilityTypeApprovedProduct> getAllBy(Long facilityTypeId, Long programId, String searchParam, Pagination pagination); List<FacilityTypeApprovedProduct> getAllByFacilityAndProgramId( Long facilityId, Long programId); Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam); void delete(Long id); FacilityTypeApprovedProduct get(Long id); }
FacilityApprovedProductRepository { public void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct) { mapper.insert(facilityTypeApprovedProduct); }  List<FacilityTypeApprovedProduct> getFullSupplyProductsByFacilityAndProgram(Long facilityId, Long programId); List<FacilityTypeApprovedProduct> getNonFullSupplyProductsByFacilityAndProgram(Long facilityId, Long programId); void insert(FacilityTypeApprovedProduct facilityTypeApprovedProduct); void update(FacilityTypeApprovedProduct facilityTypeApprovedProduct); FacilityTypeApprovedProduct getFacilityApprovedProductByProgramProductAndFacilityTypeCode(
    FacilityTypeApprovedProduct facilityTypeApprovedProduct); List<FacilityTypeApprovedProduct> getAllBy(Long facilityTypeId, Long programId, String searchParam, Pagination pagination); List<FacilityTypeApprovedProduct> getAllByFacilityAndProgramId( Long facilityId, Long programId); Integer getTotalSearchResultCount(Long facilityTypeId, Long programId, String searchParam); void delete(Long id); FacilityTypeApprovedProduct get(Long id);  }