@Test
public void testAllMethods() throws Exception {
assertEquals("Wrong account", null, accountService.getAccountById(Utils.getRandomShort(random)));
assertEquals("Wrong account", InMemoryUnknownAccountService.UNKNOWN_ACCOUNT,
accountService.getAccountById((short) -1));
assertEquals("Wrong account", InMemoryUnknownAccountService.UNKNOWN_ACCOUNT,
accountService.getAccountByName(UtilsTest.getRandomString(10)));
assertEquals("Wrong size of account collection", 1, accountService.getAllAccounts().size());
Account account = new AccountBuilder((short) 1, "a", Account.AccountStatus.INACTIVE).build();
assertFalse("Wrong return value from an unsuccessful update operation",
accountService.updateAccounts(Collections.singletonList(account)));
assertEquals("Wrong size of account collection", 1, accountService.getAllAccounts().size());
try {
accountService.getAllAccounts().add(account);
fail("Should have thrown.");
} catch (UnsupportedOperationException e) {
}
accountService.close();
}