@Test public void shouldSavePatientDataReportSuccessfully() throws LMISException { when(malariaProgramRepository.save(malariaProgram)).thenReturn(Optional.of(malariaProgram)); Optional<MalariaProgram> savedMalariaProgram = patientDataService.save(malariaProgram); assertThat(savedMalariaProgram.get(), is(malariaProgram)); }
public Optional<MalariaProgram> save(MalariaProgram malariaProgram) throws LMISException { return malariaProgramRepository.save(malariaProgram); }
PatientDataService { public Optional<MalariaProgram> save(MalariaProgram malariaProgram) throws LMISException { return malariaProgramRepository.save(malariaProgram); } }
PatientDataService { public Optional<MalariaProgram> save(MalariaProgram malariaProgram) throws LMISException { return malariaProgramRepository.save(malariaProgram); }  }
PatientDataService { public Optional<MalariaProgram> save(MalariaProgram malariaProgram) throws LMISException { return malariaProgramRepository.save(malariaProgram); }  List<Period> calculatePeriods(VIAReportType VIAReportType); List<StockCard> getMalariaProductsStockCards(); List<Long> getMalariaProductsStockHand(); Optional<MalariaProgram> save(MalariaProgram malariaProgram); MalariaProgram findForPeriod(DateTime beginDate, DateTime endDate); List<Product> getMalariaProducts(); }
PatientDataService { public Optional<MalariaProgram> save(MalariaProgram malariaProgram) throws LMISException { return malariaProgramRepository.save(malariaProgram); }  List<Period> calculatePeriods(VIAReportType VIAReportType); List<StockCard> getMalariaProductsStockCards(); List<Long> getMalariaProductsStockHand(); Optional<MalariaProgram> save(MalariaProgram malariaProgram); MalariaProgram findForPeriod(DateTime beginDate, DateTime endDate); List<Product> getMalariaProducts();  }