    @Test
    public void testDeleteAccount() throws Exception {

        // Get the number of accounts before deleting
        int beforeCount = repository.getNumberOfAccounts();
        Account account = repository.getAccount(3L);

        // Delete an account and check that num is one less
        repository.deleteAccount(3L);
        int afterCount = repository.getNumberOfAccounts();
        assertThat(afterCount, is(beforeCount - 1));

        // Re-add the deleted account
        repository.createAccount(account.getBalance());
    }