public static void assertAccountInAccountService(Account account, AccountService accountService) {
    Account accountFoundById = accountService.getAccountById(account.getId());
    Account accountFoundByName = accountService.getAccountByName(account.getName());
    assertEquals("Account got by name from accountService does not match account to assert.", account,
        accountFoundByName);
    assertEquals("Account got by id from accountService does not match the account to assert", account,
        accountFoundById);
    assertEquals("The number of containers in the account is wrong.", accountFoundById.getAllContainers().size(),
        account.getAllContainers().size());
    for (Container container : account.getAllContainers()) {
      assertContainerInAccountService(container, accountService);
    }
  }
Asserts that an {@link Account} exists in the {@link AccountService}.
@param account The {@link Account} to assert existence.
@param accountService The {@link AccountService} to assert {@link Account} existence.
ambry-test-utils/src/main/java/com/github/ambry/utils/AccountTestUtils.java