@Test public final void test_save() { BankAccount expextedResult = getBankAccount(); when(bankAccountRepository.save(any(BankAccount.class))).thenReturn(getBankAccount()); BankAccount actualResult = bankAccountService.save(getBankAccount()); assertEquals(expextedResult, actualResult); }
@Transactional public BankAccount save(BankAccount bankAccount) { return bankAccountRepository.save(bankAccount); }
BankAccountService { @Transactional public BankAccount save(BankAccount bankAccount) { return bankAccountRepository.save(bankAccount); } }
BankAccountService { @Transactional public BankAccount save(BankAccount bankAccount) { return bankAccountRepository.save(bankAccount); }  }
BankAccountService { @Transactional public BankAccount save(BankAccount bankAccount) { return bankAccountRepository.save(bankAccount); }  @Transactional List<BankAccount> create(List<BankAccount> bankAccounts, BindingResult errors, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, BindingResult errors, RequestInfo requestInfo); List<BankAccount> fetchRelated(List<BankAccount> bankaccounts); @Transactional List<BankAccount> update(List<BankAccount> bankaccounts, BindingResult errors); void addToQue(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch bankAccountSearch, BindingResult errors); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount); }
BankAccountService { @Transactional public BankAccount save(BankAccount bankAccount) { return bankAccountRepository.save(bankAccount); }  @Transactional List<BankAccount> create(List<BankAccount> bankAccounts, BindingResult errors, RequestInfo requestInfo); @Transactional List<BankAccount> update(List<BankAccount> bankAccounts, BindingResult errors, RequestInfo requestInfo); List<BankAccount> fetchRelated(List<BankAccount> bankaccounts); @Transactional List<BankAccount> update(List<BankAccount> bankaccounts, BindingResult errors); void addToQue(BankAccountRequest request); Pagination<BankAccount> search(BankAccountSearch bankAccountSearch, BindingResult errors); @Transactional BankAccount save(BankAccount bankAccount); @Transactional BankAccount update(BankAccount bankAccount);  }