### Question:
AwsAuthConfigProperties { static Properties forAwsRegionConsumerProps(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(); properties.setProperty(AWSConfigConstants.AWS_ENDPOINT, customEndpoint.serviceEndpoint()); properties.setProperty(AWSConfigConstants.AWS_REGION, customEndpoint.regionId()); } else { throw new IllegalStateException("Unrecognized AWS region configuration type: " + awsRegion); } return properties; } private  AwsAuthConfigProperties();   }### Answer:
@Test public void awsDefaultRegionConsumerProperties() { try (final ScopedSystemProperty awsRegionSystemProps = new ScopedSystemProperty(SDKGlobalConfiguration.AWS_REGION_SYSTEM_PROPERTY, "us-west-1")) { final Properties properties = AwsAuthConfigProperties.forAwsRegionConsumerProps(AwsRegion.fromDefaultProviderChain()); assertThat(properties.entrySet(), hasSize(1)); assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-west-1")); } }
@Test public void awsSpecificRegionConsumerProperties() { final Properties properties = AwsAuthConfigProperties.forAwsRegionConsumerProps(AwsRegion.ofId("us-east-2")); assertThat(properties.entrySet(), hasSize(1)); assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-east-2")); }
@Test public void awsCustomEndpointRegionConsumerProperties() { final Properties properties = AwsAuthConfigProperties.forAwsRegionConsumerProps( AwsRegion.ofCustomEndpoint("https: assertThat(properties.entrySet(), hasSize(2)); assertThat(properties, hasEntry(AWSConfigConstants.AWS_ENDPOINT, "https: assertThat(properties, hasEntry(AWSConfigConstants.AWS_REGION, "us-east-1")); }