JpaAccountRepository implements AccountRepository { @Override public List<Account> getAccounts() { return entityManager.createQuery("select a from Account a", Account.class) .getResultList(); }  @Override List<Account> getAccounts(); @Override Account getAccount(Long id); @Override int getNumberOfAccounts(); @Override Long createAccount(BigDecimal initialBalance); @Override int deleteAccount(Long id); @Override void updateAccount(Account account);  }
@Test public void testGetAccounts() throws Exception { List<Account> accounts = repository.getAccounts(); assertThat(accounts.size(), is(3)); }