@Test
  public void testBackgroundUpdater() throws Exception {
    helixConfigProps.setProperty(HelixAccountServiceConfig.UPDATER_POLLING_INTERVAL_MS_KEY, "1");
    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();
    CountDownLatch latch = new CountDownLatch(1);
    mockHelixAccountServiceFactory.getHelixStore(ZK_CONNECT_STRING, storeConfig).setReadLatch(latch);
    assertEquals("Wrong number of thread for account updater.", 1, numThreadsByThisName(updaterThreadPrefix));
    awaitLatchOrTimeout(latch, 100);
  }
Tests the background updater for updating accounts from remote. During the initialization of
{@link HelixAccountService}, its internal {@link HelixPropertyStore} will be read to first time get account data.
Because of the background account updater, it should continuously make get calls to the {@link HelixPropertyStore},
even no notification for account updates is received. Therefore, there will be more than 1 get calls to the
{@link HelixPropertyStore}.
@throws Exception
ambry-account/src/test/java/com/github/ambry/account/HelixAccountServiceTest.java