private void createOrUpdateAccountsAndWait(Collection<Account> accounts) throws Exception {
    String jsonFilePath = tempDirPath + File.separator + UUID.randomUUID().toString() + ".json";
    writeAccountsToFile(accounts, jsonFilePath);
    accountUpdateConsumer.reset();
    try (AccountService accountService = AccountUpdateTool.getHelixAccountService(ZK_SERVER_ADDRESS,
        HELIX_STORE_ROOT_PATH, BACKUP_DIR, ZK_CONNECTION_TIMEOUT_MS, ZK_SESSION_TIMEOUT_MS)) {
      new AccountUpdateTool(accountService, containerJsonVersion).updateAccountsFromFile(jsonFilePath, false);
    }
    accountUpdateConsumer.awaitUpdate();
  }
Creates or updates a collection of {@link Account}s to {@code ZooKeeper} server.
@param accounts The collection of {@link Account}s to create or update.
@throws Exception Any unexpected exception.
ambry-tools/src/integration-test/java/com/github/ambry/account/AccountUpdateToolTest.java