@Test
  public void testUpdateDisabled() throws Exception {
    helixConfigProps.setProperty(HelixAccountServiceConfig.UPDATE_DISABLED, "true");
    vHelixConfigProps = new VerifiableProperties(helixConfigProps);
    storeConfig = new HelixPropertyStoreConfig(vHelixConfigProps);
    String updaterThreadPrefix = UUID.randomUUID().toString();
    MockHelixAccountServiceFactory mockHelixAccountServiceFactory =
        new MockHelixAccountServiceFactory(vHelixConfigProps, new MetricRegistry(), notifier, updaterThreadPrefix,
            mockRouter);
    accountService = mockHelixAccountServiceFactory.getAccountService();

    // add a new account
    Account newAccountWithoutContainer = new AccountBuilder(refAccountId, refAccountName, refAccountStatus).build();
    List<Account> accountsToUpdate = Collections.singletonList(newAccountWithoutContainer);
    try {
      accountService.updateAccounts(accountsToUpdate);
      fail("Update accounts should be disabled");
    } catch (AccountServiceException e) {
      assertEquals("Mismatch in error code", AccountServiceErrorCode.UpdateDisabled, e.getErrorCode());
    }
  }
Tests disabling account updates. By setting the {@link HelixAccountServiceConfig#UPDATE_DISABLED} to be true, all the
account update request should be rejected.
ambry-account/src/test/java/com/github/ambry/account/HelixAccountServiceTest.java