InMemoryAccountRepository implements AccountRepository { @Override public Account getAccount(Long id) { return accountMap.get(id); }  @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 testGetAccount() throws Exception { Account account = repository.getAccount(1L); assertThat(account.getId(), is(1L)); assertThat(new BigDecimal("100.0"), is(closeTo(account.getBalance(), new BigDecimal("0.01")))); }