@Test public void saveAccount() { Account acc = ServiceTestConfiguration.account(); when(repo.save(acc)).thenReturn(acc); assertEquals(service.saveAccount(acc),acc.getId()); }
public Integer saveAccount(Account accountRequest) { logger.debug("AccountService.saveAccount:" + accountRequest.toString()); Account account = accounts.save(accountRequest); logger.info("AccountService.saveAccount: account saved: " + account); return account.getId(); }
AccountService { public Integer saveAccount(Account accountRequest) { logger.debug("AccountService.saveAccount:" + accountRequest.toString()); Account account = accounts.save(accountRequest); logger.info("AccountService.saveAccount: account saved: " + account); return account.getId(); } }
AccountService { public Integer saveAccount(Account accountRequest) { logger.debug("AccountService.saveAccount:" + accountRequest.toString()); Account account = accounts.save(accountRequest); logger.info("AccountService.saveAccount: account saved: " + account); return account.getId(); }  }
AccountService { public Integer saveAccount(Account accountRequest) { logger.debug("AccountService.saveAccount:" + accountRequest.toString()); Account account = accounts.save(accountRequest); logger.info("AccountService.saveAccount: account saved: " + account); return account.getId(); }  Account findAccount(Integer id); List<Account> findAccounts(String user); List<Account> findAccountsByType(String id, AccountType type); Integer saveAccount(Account accountRequest); }
AccountService { public Integer saveAccount(Account accountRequest) { logger.debug("AccountService.saveAccount:" + accountRequest.toString()); Account account = accounts.save(accountRequest); logger.info("AccountService.saveAccount: account saved: " + account); return account.getId(); }  Account findAccount(Integer id); List<Account> findAccounts(String user); List<Account> findAccountsByType(String id, AccountType type); Integer saveAccount(Account accountRequest);  }