AwsSystemPropertyRegionProvider extends AwsRegionProvider { @Override public String getRegion() throws SdkClientException { return System.getProperty(SDKGlobalConfiguration.AWS_REGION_SYSTEM_PROPERTY); }  @Override String getRegion();  }
@Test public void systemPropertySet_ReturnsSystemPropertyValueFromProvider() { try { final String expectedRegion = "some-system-prop-region"; System.setProperty(AWS_REGION_SYSTEM_PROPERTY, expectedRegion); assertEquals(expectedRegion, new AwsSystemPropertyRegionProvider().getRegion()); } finally { System.clearProperty(AWS_REGION_SYSTEM_PROPERTY); } }
@Test public void systemPropertyNotSet_ReturnsNull() { assertNull(new AwsSystemPropertyRegionProvider().getRegion()); }