@Test public final void test_save() { Fund expextedResult = getFunds().get(0); when(fundRepository.save(any(Fund.class))).thenReturn(expextedResult); Fund actualResult = fundService.save(getFunds().get(0)); assertEquals(expextedResult, actualResult); }
@Transactional public Fund save(Fund fund) { return fundRepository.save(fund); }
FundService { @Transactional public Fund save(Fund fund) { return fundRepository.save(fund); } }
FundService { @Transactional public Fund save(Fund fund) { return fundRepository.save(fund); }  }
FundService { @Transactional public Fund save(Fund fund) { return fundRepository.save(fund); }  @Transactional List<Fund> create(List<Fund> funds, BindingResult errors, RequestInfo requestInfo); @Transactional List<Fund> update(List<Fund> funds, BindingResult errors, RequestInfo requestInfo); List<Fund> fetchRelated(List<Fund> funds); Pagination<Fund> search(FundSearch fundSearch, BindingResult errors); @Transactional Fund save(Fund fund); @Transactional Fund update(Fund fund); }
FundService { @Transactional public Fund save(Fund fund) { return fundRepository.save(fund); }  @Transactional List<Fund> create(List<Fund> funds, BindingResult errors, RequestInfo requestInfo); @Transactional List<Fund> update(List<Fund> funds, BindingResult errors, RequestInfo requestInfo); List<Fund> fetchRelated(List<Fund> funds); Pagination<Fund> search(FundSearch fundSearch, BindingResult errors); @Transactional Fund save(Fund fund); @Transactional Fund update(Fund fund);  }