@SuppressWarnings("unchecked")
  public static <T> T initialize(Map<String, String> properties) {
    String factoryImpl =
        PropertyUtil.propertyAsString(properties, S3FileIOProperties.CLIENT_FACTORY, null);
    if (Strings.isNullOrEmpty(factoryImpl)) {
      return (T) AwsClientFactories.from(properties);
    }
    return (T) loadClientFactory(factoryImpl, properties);
  }
@Test
  public void testS3FileIOImplCatalogPropertyDefined() {
    Map<String, String> properties = Maps.newHashMap();
    properties.put(
        S3FileIOProperties.CLIENT_FACTORY,
        "org.apache.iceberg.aws.s3.DefaultS3FileIOAwsClientFactory");
    Object factoryImpl = S3FileIOAwsClientFactories.initialize(properties);
    assertThat(factoryImpl)
        .as(
            "should instantiate an object of type S3FileIOAwsClientFactory when s3.client-factory-impl is set")
        .isInstanceOf(S3FileIOAwsClientFactory.class);
  }