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);  }
@Test public void saveAccount() { Account acc = ServiceTestConfiguration.account(); when(repo.save(acc)).thenReturn(acc); assertEquals(service.saveAccount(acc),acc.getId()); }