@Test public final void test_save() { final Budget expextedResult = getBudgets().get(0); when(budgetRepository.save(any(Budget.class))).thenReturn(expextedResult); final Budget actualResult = budgetService.save(expextedResult); assertEquals(expextedResult, actualResult); }
@Transactional public Budget save(final Budget budget) { return budgetRepository.save(budget); }
BudgetService { @Transactional public Budget save(final Budget budget) { return budgetRepository.save(budget); } }
BudgetService { @Transactional public Budget save(final Budget budget) { return budgetRepository.save(budget); } @Autowired  BudgetService(final SmartValidator validator, final BudgetRepository budgetRepository,
            final FinancialYearContractRepository financialYearContractRepository); }
BudgetService { @Transactional public Budget save(final Budget budget) { return budgetRepository.save(budget); } @Autowired  BudgetService(final SmartValidator validator, final BudgetRepository budgetRepository,
            final FinancialYearContractRepository financialYearContractRepository); @Transactional List<Budget> create(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<Budget> update(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<Budget> delete(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); BindingResult validate(final List<Budget> budgets, final String method, final BindingResult errors); List<Budget> fetchRelated(final List<Budget> budgets,RequestInfo requestInfo); Pagination<Budget> search(final BudgetSearch budgetSearch); @Transactional Budget save(final Budget budget); @Transactional Budget update(final Budget budget); @Transactional Budget delete(Budget budget); }
BudgetService { @Transactional public Budget save(final Budget budget) { return budgetRepository.save(budget); } @Autowired  BudgetService(final SmartValidator validator, final BudgetRepository budgetRepository,
            final FinancialYearContractRepository financialYearContractRepository); @Transactional List<Budget> create(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<Budget> update(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<Budget> delete(List<Budget> budgets, final BindingResult errors,
            final RequestInfo requestInfo); BindingResult validate(final List<Budget> budgets, final String method, final BindingResult errors); List<Budget> fetchRelated(final List<Budget> budgets,RequestInfo requestInfo); Pagination<Budget> search(final BudgetSearch budgetSearch); @Transactional Budget save(final Budget budget); @Transactional Budget update(final Budget budget); @Transactional Budget delete(Budget budget); static final String ACTION_CREATE; static final String ACTION_UPDATE; static final String ACTION_DELETE; static final String ACTION_VIEW; static final String ACTION_EDIT; static final String ACTION_SEARCH; }