@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);
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);
}