@VisibleForTesting
  HiveClientPool clientPool() {
    return clientPoolCache.get(key, k -> new HiveClientPool(clientPoolSize, conf));
  }
@Test
  public void testHmsCatalog() {
    Map<String, String> properties =
        ImmutableMap.of(
            String.valueOf(EVICTION_INTERVAL),
            String.valueOf(Integer.MAX_VALUE),
            ICEBERG_CATALOG_TYPE,
            ICEBERG_CATALOG_TYPE_HIVE);

    Configuration conf1 = new Configuration();
    conf1.set(HiveCatalog.HIVE_CONF_CATALOG, "foo");

    Configuration conf2 = new Configuration();
    conf2.set(HiveCatalog.HIVE_CONF_CATALOG, "foo");

    Configuration conf3 = new Configuration();
    conf3.set(HiveCatalog.HIVE_CONF_CATALOG, "bar");

    HiveCatalog catalog1 = (HiveCatalog) CatalogUtil.buildIcebergCatalog("1", properties, conf1);
    HiveCatalog catalog2 = (HiveCatalog) CatalogUtil.buildIcebergCatalog("2", properties, conf2);
    HiveCatalog catalog3 = (HiveCatalog) CatalogUtil.buildIcebergCatalog("3", properties, conf3);
    HiveCatalog catalog4 =
        (HiveCatalog) CatalogUtil.buildIcebergCatalog("4", properties, new Configuration());

    HiveClientPool pool1 = ((CachedClientPool) catalog1.clientPool()).clientPool();
    HiveClientPool pool2 = ((CachedClientPool) catalog2.clientPool()).clientPool();
    HiveClientPool pool3 = ((CachedClientPool) catalog3.clientPool()).clientPool();
    HiveClientPool pool4 = ((CachedClientPool) catalog4.clientPool()).clientPool();

    assertThat(pool2).isSameAs(pool1);
    assertThat(pool1).isNotSameAs(pool3);
    assertThat(pool2).isNotSameAs(pool3);
    assertThat(pool4).isNotSameAs(pool3);
    assertThat(pool1).isNotSameAs(pool4);
    assertThat(pool2).isNotSameAs(pool4);

    assertThat(pool1.hiveConf().get(HiveCatalog.HIVE_CONF_CATALOG)).isEqualTo("foo");
    assertThat(pool3.hiveConf().get(HiveCatalog.HIVE_CONF_CATALOG)).isEqualTo("bar");
    assertThat(pool4.hiveConf().get(HiveCatalog.HIVE_CONF_CATALOG)).isNull();

    pool1.close();
    pool3.close();
    pool4.close();
  }