ConfigurationHelper { public String getPropertyAsString(ConfigurationValue configurationValue) { return environment .getProperty(configurationValue.getKey(), configurationValue.getDefaultValue() == null ? "" : configurationValue.getDefaultValue().toString()); }  static String getProperty(ConfigurationValue configurationValue, Environment environment); static T getProperty(ConfigurationValue configurationValue, Class<T> targetType, Environment environment); BigDecimal getBigDecimalRequiredProperty(ConfigurationValue configurationValue); BigDecimal getBigDecimalRequiredProperty(ConfigurationValue configurationValue, Environment environment); Boolean getBooleanProperty(ConfigurationValue configurationValue); Boolean getBooleanProperty(ConfigurationValue configurationValue, Environment environment); BigDecimal getNonNegativeBigDecimalRequiredProperty(ConfigurationValue configurationValue); BigDecimal getNonNegativeBigDecimalRequiredProperty(ConfigurationValue configurationValue, Environment environment); String getProperty(ConfigurationValue configurationValue); T getProperty(ConfigurationValue configurationValue, Class<T> targetType); String getPropertyAsString(ConfigurationValue configurationValue); String getRequiredProperty(ConfigurationValue configurationValue); String getRequiredProperty(ConfigurationValue configurationValue, Environment environment);  }
@Test public void testGetPropertyAsString() { ConfigurationValue configurationValue = ConfigurationValue.HERD_ENVIRONMENT; String value = configurationHelper.getPropertyAsString(configurationValue); assertEquals(configurationValue.getDefaultValue(), value); configurationValue = ConfigurationValue.AWS_REGION_NAME; value = configurationHelper.getPropertyAsString(configurationValue); assertEquals("", value); configurationValue = ConfigurationValue.AWS_MAX_RETRY_ATTEMPT; value = configurationHelper.getPropertyAsString(configurationValue); assertEquals(configurationValue.getDefaultValue().toString(), value); configurationValue = ConfigurationValue.ELASTICSEARCH_BDEF_SPOT_CHECK_PERCENTAGE; value = configurationHelper.getPropertyAsString(configurationValue); assertEquals(configurationValue.getDefaultValue().toString(), value); configurationValue = ConfigurationValue.ACTIVITI_JOB_DEFINITION_ASSERT_ASYNC; value = configurationHelper.getPropertyAsString(configurationValue); assertEquals(configurationValue.getDefaultValue().toString(), value); }