@Test
  public void testWithIcebergCatalogInitializeProperties() {
    Map<String, String> props;
    final String name = "test";
    final String typeHadoop = "hadoop";
    final String typeCustom = "custom";
    final String typeAms = CatalogMetaProperties.CATALOG_TYPE_AMS;
    final String type = "type";
    final String keyWarehouse = CatalogProperties.WAREHOUSE_LOCATION;
    final String path = "hdfs://test-cluster/warehouse";
    final String restImpl = RESTCatalog.class.getName();

    // hive catalog
    props =
        MixedFormatCatalogUtil.withIcebergCatalogInitializeProperties(
            name, typeHadoop, ImmutableMap.of(keyWarehouse, path));
    Assert.assertEquals(typeHadoop, props.get(type));

    // custom
    props =
        MixedFormatCatalogUtil.withIcebergCatalogInitializeProperties(
            name,
            typeCustom,
            ImmutableMap.of(keyWarehouse, path, CatalogProperties.CATALOG_IMPL, restImpl));
    Assert.assertFalse(props.containsKey(type));
    // custom args check
    Assert.assertThrows(
        IllegalArgumentException.class,
        () -> {
          MixedFormatCatalogUtil.withIcebergCatalogInitializeProperties(
              name, typeCustom, ImmutableMap.of(keyWarehouse, path));
        });

    // ams
    props =
        MixedFormatCatalogUtil.withIcebergCatalogInitializeProperties(
            name, typeAms, ImmutableMap.of(keyWarehouse, path));
    Assert.assertEquals(name, props.get(keyWarehouse));
    Assert.assertFalse(props.containsKey(type));
    Assert.assertEquals(restImpl, props.get(CatalogProperties.CATALOG_IMPL));
  }
user-defined 'self-optimizing.enabled' is switched on, overwrite behavior of default catalog
props
amoro-format-iceberg/src/test/java/org/apache/amoro/utils/TestMixedFormatCatalogUtil.java