@Test public final void testSave() { Bank expectedResult = getBank(); when(bankRepository.save(any(Bank.class))).thenReturn(expectedResult); final Bank actualResult = bankService.save(getBank()); assertEquals(expectedResult, actualResult); }
@Transactional public Bank save(Bank bank) { return bankRepository.save(bank); }
BankService { @Transactional public Bank save(Bank bank) { return bankRepository.save(bank); } }
BankService { @Transactional public Bank save(Bank bank) { return bankRepository.save(bank); }  }
BankService { @Transactional public Bank save(Bank bank) { return bankRepository.save(bank); }  @Transactional List<Bank> create(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); List<Bank> fetchRelated(List<Bank> banks); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors); Pagination<Bank> search(BankSearch bankSearch, BindingResult errors); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank); }
BankService { @Transactional public Bank save(Bank bank) { return bankRepository.save(bank); }  @Transactional List<Bank> create(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); List<Bank> fetchRelated(List<Bank> banks); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors); Pagination<Bank> search(BankSearch bankSearch, BindingResult errors); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank);  }