JdbcAccountRepository implements AccountRepository { @Override public List<Account> getAccounts() { String sqlTxt = "select * from account"; return template.query(sqlTxt, new AccountMapper()); } @Autowired  JdbcAccountRepository(DataSource dataSource); @Override List<Account> getAccounts(); @Override Account getAccount(Long id); @Override int getNumberOfAccounts(); @Override Long createAccount(BigDecimal initialBalance); @Override void updateAccount(Account account); @Override int deleteAccount(Long id);  }
@Test public void testGetAccounts() throws Exception { List<Account> accounts = repository.getAccounts(); assertThat(accounts.size(), is(3)); }