### Question:
CatalogTracker { public ServerName getRootLocation() throws InterruptedException { return this.rootRegionTracker.getRootRegionLocation(); } CatalogTracker(final Configuration conf);  CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
      Abortable abortable);   CatalogTracker(final ZooKeeperWatcher zk, final Configuration conf,
      HConnection connection, Abortable abortable); void start(); void stop(); ServerName getRootLocation(); ServerName getMetaLocation(); ServerName getMetaLocationOrReadLocationFromRoot(); void waitForRoot(); HRegionInterface waitForRootServerConnection(long timeout); void waitForMeta(); ServerName waitForMeta(long timeout); HRegionInterface waitForMetaServerConnection(long timeout); void resetMetaLocation(); boolean verifyRootRegionLocation(final long timeout); boolean verifyMetaRegionLocation(final long timeout); HConnection getConnection();  }### Answer:
@Test public void testNoTimeoutWaitForRoot() throws IOException, InterruptedException, KeeperException { HConnection connection = Mockito.mock(HConnection.class); final CatalogTracker ct = constructAndStartCatalogTracker(connection); ServerName hsa = ct.getRootLocation(); Assert.assertNull(hsa); Thread t = new WaitOnMetaThread(ct); startWaitAliveThenWaitItLives(t, 1000); hsa = setRootLocation(); t.join(); Assert.assertTrue(ct.getRootLocation().equals(hsa)); }