@Test public void shouldInsertNewCostWithStartDateAsCurrentAndCloseLastPeriodsCostWithEndDateAsCurrent() throws Exception { ProgramProductPrice programProductPrice = new ProgramProductPrice(); programProductRepository.updatePriceHistory(programProductPrice); verify(programProductPriceMapper).closeLastActivePrice(programProductPrice); verify(programProductPriceMapper).insertNewCurrentPrice(programProductPrice); }
public void updatePriceHistory(ProgramProductPrice programProductPrice) { programProductPriceMapper.closeLastActivePrice(programProductPrice); programProductPriceMapper.insertNewCurrentPrice(programProductPrice); }
ProgramProductRepository { public void updatePriceHistory(ProgramProductPrice programProductPrice) { programProductPriceMapper.closeLastActivePrice(programProductPrice); programProductPriceMapper.insertNewCurrentPrice(programProductPrice); } }
ProgramProductRepository { public void updatePriceHistory(ProgramProductPrice programProductPrice) { programProductPriceMapper.closeLastActivePrice(programProductPrice); programProductPriceMapper.insertNewCurrentPrice(programProductPrice); }  }
ProgramProductRepository { public void updatePriceHistory(ProgramProductPrice programProductPrice) { programProductPriceMapper.closeLastActivePrice(programProductPrice); programProductPriceMapper.insertNewCurrentPrice(programProductPrice); }  void save(ProgramProduct programProduct); Long getIdByProgramIdAndProductId(Long programId, Long productId); void updateCurrentPrice(ProgramProduct programProduct); ProgramProduct getByProgramAndProductCode(ProgramProduct programProduct); ProgramProduct getByProgramAndProductId(Long programId, Long productId); void updatePriceHistory(ProgramProductPrice programProductPrice); void updateProgramProduct(ProgramProduct programProduct); ProgramProductPrice getProgramProductPrice(ProgramProduct programProduct); List<ProgramProduct> getByProgram(Program program); ProgramProduct getById(Long id); List<ProgramProduct> getByProductCode(String code); List<ProgramProduct> getProgramProductsBy(Long programId, String facilityTypeCode); List<ProgramProduct> getNonFullSupplyProductsForProgram(Program program); List<ProgramProduct> searchByProgram(String searchParam, Pagination pagination); Integer getTotalSearchResultCount(String searchParam); List<ProgramProduct> searchByProduct(String searchParam, Pagination pagination); List<ProgramProduct> getActiveByProgram(Long programId); @Transactional void insertISA(ProgramProductISA programProductISA); void updateISA(ProgramProductISA programProductISA); }
ProgramProductRepository { public void updatePriceHistory(ProgramProductPrice programProductPrice) { programProductPriceMapper.closeLastActivePrice(programProductPrice); programProductPriceMapper.insertNewCurrentPrice(programProductPrice); }  void save(ProgramProduct programProduct); Long getIdByProgramIdAndProductId(Long programId, Long productId); void updateCurrentPrice(ProgramProduct programProduct); ProgramProduct getByProgramAndProductCode(ProgramProduct programProduct); ProgramProduct getByProgramAndProductId(Long programId, Long productId); void updatePriceHistory(ProgramProductPrice programProductPrice); void updateProgramProduct(ProgramProduct programProduct); ProgramProductPrice getProgramProductPrice(ProgramProduct programProduct); List<ProgramProduct> getByProgram(Program program); ProgramProduct getById(Long id); List<ProgramProduct> getByProductCode(String code); List<ProgramProduct> getProgramProductsBy(Long programId, String facilityTypeCode); List<ProgramProduct> getNonFullSupplyProductsForProgram(Program program); List<ProgramProduct> searchByProgram(String searchParam, Pagination pagination); Integer getTotalSearchResultCount(String searchParam); List<ProgramProduct> searchByProduct(String searchParam, Pagination pagination); List<ProgramProduct> getActiveByProgram(Long programId); @Transactional void insertISA(ProgramProductISA programProductISA); void updateISA(ProgramProductISA programProductISA);  }