public static void assertUpdateAccountsFails(Collection<Account> accounts, AccountServiceErrorCode expectedErrorCode,
      AccountService accountService) {
    try {
      accountService.updateAccounts(accounts);
      fail("Expected update to fail");
    } catch (AccountServiceException ase) {
      assertEquals("Unexpected error code", expectedErrorCode, ase.getErrorCode());
    }
  }
Updates a collection of {@link Account}s and verifies that an {@link AccountServiceException} with the expected
error code is thrown.
@param accounts the accounts to update.
@param expectedErrorCode the {@link AccountServiceErrorCode} expected.
@param accountService The {@link AccountService} to update.
ambry-test-utils/src/main/java/com/github/ambry/utils/AccountTestUtils.java