### Question:
PropertyPlaceholderHelper { public String getPropertyValue(String key) { return properties.get(key); } PropertyPlaceholderHelper(Map<String, String> properties, String regex); String getPropertyValue(String key); Properties replacePropertiesPlaceholder(Properties properties); String replacePlaceholder(String value); Pattern getPattern(); final static String ENV_REGEX; }### Answer:
@Test public void testGetPropertyValueFromEnv() { System.out.println("getPropertyValueFromEnv"); String loggingProperty1 = "testEnvironmentHandlers"; String loggingProperty2 = "testEnvironmentHandlerServices"; PropertyPlaceholderHelper propertyPlaceholderHelper = new PropertyPlaceholderHelper(env, PropertyPlaceholderHelper.ENV_REGEX); String expResult1 = "java.util.logging.ConsoleHandler"; String result1 = propertyPlaceholderHelper.getPropertyValue(loggingProperty1); assertEquals(expResult1, result1); propertyPlaceholderHelper = new PropertyPlaceholderHelper(env, PropertyPlaceholderHelper.ENV_REGEX); String expResult2 = "com.sun.enterprise.server.logging.GFFileHandler,com.sun.enterprise.server.logging.SyslogHandler"; String result2 = propertyPlaceholderHelper.getPropertyValue(loggingProperty2); assertEquals(expResult2, result2); }