@Test
  public void testConflictingUpdateCaseD() throws Exception {
    accountService = mockHelixAccountServiceFactory.getAccountService();
    // write two accounts (1, "a") and (2, "b")
    writeAccountsForConflictTest();
    Collection<Account> conflictAccounts =
        Collections.singleton((new AccountBuilder((short) 3, "a", AccountStatus.INACTIVE).build()));
    assertUpdateAccountsFails(conflictAccounts, AccountServiceErrorCode.ResourceConflict, accountService);
    assertEquals("Wrong account number in HelixAccountService", 2, accountService.getAllAccounts().size());
    assertNull("Wrong account got from HelixAccountService", accountService.getAccountById((short) 3));
  }
Tests updating a {@link Account}, which has a new id but a name conflicting with an existing record. The update
operation will fail. This test corresponds to case D specified in the JavaDoc of {@link AccountService}.
@throws Exception Any unexpected exception.
ambry-account/src/test/java/com/github/ambry/account/HelixAccountServiceTest.java