@Test
  public void testUpdateConflictAccounts() throws Exception {
    Collection<Account> idConflictAccounts = new ArrayList<>();
    // id conflict
    idConflictAccounts.add(new AccountBuilder((short) 1, "account1", Account.AccountStatus.INACTIVE).build());
    idConflictAccounts.add(new AccountBuilder((short) 1, "account2", Account.AccountStatus.INACTIVE).build());
    TestUtils.assertException(IllegalArgumentException.class, () -> createOrUpdateAccountsAndWait(idConflictAccounts),
        null);
    Thread.sleep(100);
    assertEquals("Wrong number of accounts in accountService", 0, accountService.getAllAccounts().size());

    // name conflict
    Collection<Account> nameConflictAccounts = new ArrayList<>();
    nameConflictAccounts.add(new AccountBuilder((short) 1, "account1", Account.AccountStatus.INACTIVE).build());
    nameConflictAccounts.add(new AccountBuilder((short) 2, "account1", Account.AccountStatus.INACTIVE).build());
    TestUtils.assertException(IllegalArgumentException.class, () -> createOrUpdateAccountsAndWait(nameConflictAccounts),
        null);
    Thread.sleep(100);
    assertEquals("Wrong number of accounts in accountService", 0, accountService.getAllAccounts().size());
  }
Tests updating {@link Account}s that are conflicting.
@throws Exception Any unexpected exception.
ambry-tools/src/integration-test/java/com/github/ambry/account/AccountUpdateToolTest.java