@Test
  public void defaultHiveOnly() throws Exception {
    // By default just the Hive catalog should be cached.
    cachedStore = new CachedStore();
    cachedStore.setConf(conf);
    CachedStore.stopCacheUpdateService(1);
    cachedStore.resetCatalogCache();

    CachedStore.prewarm(objectStore);

    // Only the hive catalog should be cached
    List<String> cachedCatalogs = cachedStore.getCatalogs();
    Assert.assertEquals(1, cachedCatalogs.size());
    Assert.assertEquals(Warehouse.DEFAULT_CATALOG_NAME, cachedCatalogs.get(0));
  }
Tests that catalogs are properly cached.
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCatalogCaching.java