### Question:
AwsAuthConfigProperties { static Properties forAwsRegionProducerProps(AwsRegion awsRegion) { final Properties properties = new Properties(); if (awsRegion.isDefault()) { properties.setProperty(AWSConfigConstants.AWS_REGION, regionFromDefaultProviderChain()); } else if (awsRegion.isId()) { properties.setProperty(AWSConfigConstants.AWS_REGION, awsRegion.asId().id()); } else if (awsRegion.isCustomEndpoint()) { final AwsRegion.CustomEndpointAwsRegion customEndpoint = awsRegion.asCustomEndpoint(); final URI uri = URI.create(customEndpoint.serviceEndpoint()); properties.setProperty("KinesisEndpoint", uri.getHost()); properties.setProperty(AWSConfigConstants.AWS_REGION, customEndpoint.regionId()); int port = uri.getPort(); if (port != -1) { properties.setProperty("KinesisPort", String.valueOf(port)); } } else { throw new IllegalStateException("Unrecognized AWS region configuration type: " + awsRegion); } return properties; } private  AwsAuthConfigProperties();   }### Answer:
@Test public void awsDefaultRegionProducerProperties() { try (final ScopedSystemProperty awsRegionSystemProps = new ScopedSystemProperty(SDKGlobalConfiguration.AWS_REGION_SYSTEM_PROPERTY, "us-west-1")) { final Properties properties = AwsAuthConfigProperties.forAwsRegionProducerProps(AwsRegion.fromDefaultProviderChain()); assertThat(properties.entrySet(), hasSize(1)); assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-west-1")); } }
@Test public void awsSpecificRegionProducerProperties() { final Properties properties = AwsAuthConfigProperties.forAwsRegionProducerProps(AwsRegion.ofId("us-east-2")); assertThat(properties.entrySet(), hasSize(1)); assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-east-2")); }
@Test public void awsCustomEndpointRegionProducerProperties() { final Properties properties = AwsAuthConfigProperties.forAwsRegionProducerProps( AwsRegion.ofCustomEndpoint("https: assertThat(properties.entrySet(), hasSize(3)); assertThat(properties, hasEntry("KinesisEndpoint", "foo.bar")); assertThat(properties, hasEntry("KinesisPort", "6666")); assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-east-1")); }