ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [07/10] ambari git commit: AMBARI-18126 - Refactor Configuration To Allow For Generation Of Documentation (jonathanhurley)
Date Fri, 09 Sep 2016 21:22:55 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
index e9aebc0..22f4afa 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
@@ -85,10 +85,10 @@ public class ConfigurationTest {
   @Test
   public void testValidateAgentHostnamesOn() {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY, "true");
+    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey(), "true");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertTrue(conf.validateAgentHostnames());
-    Assert.assertEquals("true", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY));
+    Assert.assertEquals("true", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey()));
   }
 
   /**
@@ -97,10 +97,10 @@ public class ConfigurationTest {
   @Test
   public void testValidateAgentHostnamesOff() {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY, "false");
+    ambariProperties.setProperty(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey(), "false");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertFalse(conf.validateAgentHostnames());
-    Assert.assertEquals("false", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE_KEY));
+    Assert.assertEquals("false", conf.getConfigsMap().get(Configuration.SRVR_AGENT_HOSTNAME_VALIDATE.getKey()));
   }
 
   /**
@@ -139,7 +139,7 @@ public class ConfigurationTest {
   @Test
   public void testGetClientSSLApiPort() throws Exception {
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.CLIENT_API_SSL_PORT_KEY, "6666");
+    ambariProperties.setProperty(Configuration.CLIENT_API_SSL_PORT.getKey(), "6666");
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertEquals(6666, conf.getClientSSLApiPort());
     conf = new Configuration();
@@ -157,50 +157,50 @@ public class ConfigurationTest {
     FileUtils.writeStringToFile(passFile, password);
 
     Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.API_USE_SSL, "true");
+    ambariProperties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
     ambariProperties.setProperty(
-        Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY,
+        Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(),
         passFile.getParent());
     ambariProperties.setProperty(
-        Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY,
+        Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(),
         passFile.getName());
 
 
     String oneWayPort = RandomStringUtils.randomNumeric(4);
     String twoWayPort = RandomStringUtils.randomNumeric(4);
 
-    ambariProperties.setProperty(Configuration.SRVR_TWO_WAY_SSL_PORT_KEY, twoWayPort.toString());
-    ambariProperties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT_KEY, oneWayPort.toString());
+    ambariProperties.setProperty(Configuration.SRVR_TWO_WAY_SSL_PORT.getKey(), twoWayPort.toString());
+    ambariProperties.setProperty(Configuration.SRVR_ONE_WAY_SSL_PORT.getKey(), oneWayPort.toString());
 
     Configuration conf = new Configuration(ambariProperties);
     Assert.assertTrue(conf.getApiSSLAuthentication());
 
     //Different certificates for two-way SSL and HTTPS
-    Assert.assertFalse(conf.getConfigsMap().get(Configuration.KSTR_NAME_KEY).
-      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_KSTR_NAME_KEY)));
-    Assert.assertFalse(conf.getConfigsMap().get(Configuration.SRVR_CRT_NAME_KEY).
-      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_NAME_KEY)));
+    Assert.assertFalse(conf.getConfigsMap().get(Configuration.KSTR_NAME.getKey()).
+      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_KSTR_NAME.getKey())));
+    Assert.assertFalse(conf.getConfigsMap().get(Configuration.SRVR_CRT_NAME.getKey()).
+      equals(conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_NAME.getKey())));
 
     Assert.assertEquals("keystore.p12", conf.getConfigsMap().get(
-        Configuration.KSTR_NAME_KEY));
+        Configuration.KSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.KSTR_TYPE_KEY));
+        Configuration.KSTR_TYPE.getKey()));
     Assert.assertEquals("keystore.p12", conf.getConfigsMap().get(
-        Configuration.TSTR_NAME_KEY));
+        Configuration.TSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.TSTR_TYPE_KEY));
+        Configuration.TSTR_TYPE.getKey()));
 
     Assert.assertEquals("https.keystore.p12", conf.getConfigsMap().get(
-      Configuration.CLIENT_API_SSL_KSTR_NAME_KEY));
+      Configuration.CLIENT_API_SSL_KSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_KSTR_TYPE_KEY));
+        Configuration.CLIENT_API_SSL_KSTR_TYPE.getKey()));
     Assert.assertEquals("https.keystore.p12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_TSTR_NAME_KEY));
+        Configuration.CLIENT_API_SSL_TSTR_NAME.getKey()));
     Assert.assertEquals("PKCS12", conf.getConfigsMap().get(
-        Configuration.CLIENT_API_SSL_TSTR_TYPE_KEY));
+        Configuration.CLIENT_API_SSL_TSTR_TYPE.getKey()));
     Assert.assertEquals(passFile.getName(), conf.getConfigsMap().get(
-      Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY));
-    Assert.assertEquals(password, conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_PASS_KEY));
+      Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey()));
+    Assert.assertEquals(password, conf.getConfigsMap().get(Configuration.CLIENT_API_SSL_CRT_PASS.getKey()));
     Assert.assertEquals(Integer.parseInt(twoWayPort), conf.getTwoWayAuthPort());
     Assert.assertEquals(Integer.parseInt(oneWayPort), conf.getOneWayAuthPort());
 
@@ -211,7 +211,7 @@ public class ConfigurationTest {
     Properties ambariProperties = new Properties();
     String unencrypted = "fake-unencrypted-password";
     String encrypted = "fake-encrypted-password";
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY, unencrypted);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey(), unencrypted);
     Configuration conf = spy(new Configuration(ambariProperties));
     doReturn(null).when(conf).readPasswordFromStore(anyString());
     conf.loadSSLParams();
@@ -223,7 +223,7 @@ public class ConfigurationTest {
     Properties ambariProperties = new Properties();
     String unencrypted = "fake-unencrypted-password";
     String encrypted = "fake-encrypted-password";
-    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD_KEY, unencrypted);
+    ambariProperties.setProperty(Configuration.SSL_TRUSTSTORE_PASSWORD.getKey(), unencrypted);
     Configuration conf = spy(new Configuration(ambariProperties));
     doReturn(encrypted).when(conf).readPasswordFromStore(anyString());
     conf.loadSSLParams();
@@ -236,7 +236,7 @@ public class ConfigurationTest {
     String encrypted = "password";
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SERVER_JDBC_RCA_USER_PASSWD_KEY, serverJdbcRcaUserPasswdKey);
+    properties.setProperty(Configuration.SERVER_JDBC_RCA_USER_PASSWD.getKey(), serverJdbcRcaUserPasswdKey);
     Configuration conf = spy(new Configuration(properties));
     doReturn(encrypted).when(conf).readPasswordFromStore(serverJdbcRcaUserPasswdKey);
 
@@ -267,7 +267,7 @@ public class ConfigurationTest {
     String passwordFile = temp.getRoot().getAbsolutePath()
       + System.getProperty("file.separator") + "password.dat";
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_USER_PASSWD_KEY,
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_USER_PASSWD.getKey(),
       passwordFile);
 
     Configuration conf = new Configuration(ambariProperties);
@@ -360,7 +360,7 @@ public class ConfigurationTest {
     Assert.assertEquals(Integer.valueOf(1200), conf.getDefaultServerTaskTimeout());
 
     ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.SERVER_TASK_TIMEOUT_KEY, "3600");
+    ambariProperties.setProperty(Configuration.SERVER_TASK_TIMEOUT.getKey(), "3600");
 
     conf = new Configuration(ambariProperties);
 
@@ -370,7 +370,7 @@ public class ConfigurationTest {
   @Test
   public void testGetLdapServerProperties_WrongManagerPassword() throws Exception {
     final Properties ambariProperties = new Properties();
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD_KEY, "somePassword");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD.getKey(), "somePassword");
     final Configuration configuration = new Configuration(ambariProperties);
 
     final LdapServerProperties ldapProperties = configuration.getLdapServerProperties();
@@ -384,11 +384,11 @@ public class ConfigurationTest {
     Configuration configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewValidationEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE, "false");
+    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE.getKey(), "false");
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewValidationEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE, "true");
+    ambariProperties.setProperty(Configuration.VIEWS_VALIDATE.getKey(), "true");
     configuration = new Configuration(ambariProperties);
     Assert.assertTrue(configuration.isViewValidationEnabled());
   }
@@ -399,15 +399,17 @@ public class ConfigurationTest {
     Configuration configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, "false");
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(), "false");
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, "true");
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(), "true");
     configuration = new Configuration(ambariProperties);
     Assert.assertTrue(configuration.isViewRemoveUndeployedEnabled());
 
-    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED, Configuration.VIEWS_REMOVE_UNDEPLOYED_DEFAULT);
+    ambariProperties.setProperty(Configuration.VIEWS_REMOVE_UNDEPLOYED.getKey(),
+        Configuration.VIEWS_REMOVE_UNDEPLOYED.getDefaultValue());
+
     configuration = new Configuration(ambariProperties);
     Assert.assertFalse(configuration.isViewRemoveUndeployedEnabled());
   }
@@ -423,22 +425,22 @@ public class ConfigurationTest {
     fos.close();
     final String passwordFilePath = temp.getRoot().getAbsolutePath() + File.separator + "ldap-password.dat";
 
-    ambariProperties.setProperty(Configuration.LDAP_PRIMARY_URL_KEY, "1");
-    ambariProperties.setProperty(Configuration.LDAP_SECONDARY_URL_KEY, "2");
-    ambariProperties.setProperty(Configuration.LDAP_USE_SSL_KEY, "true");
-    ambariProperties.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY_KEY, "true");
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_DN_KEY, "5");
-    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD_KEY, passwordFilePath);
-    ambariProperties.setProperty(Configuration.LDAP_BASE_DN_KEY, "7");
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "8");
-    ambariProperties.setProperty(Configuration.LDAP_USER_BASE_KEY, "9");
-    ambariProperties.setProperty(Configuration.LDAP_USER_OBJECT_CLASS_KEY, "10");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_BASE_KEY, "11");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS_KEY, "12");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR_KEY, "13");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR_KEY, "14");
-    ambariProperties.setProperty(Configuration.LDAP_ADMIN_GROUP_MAPPING_RULES_KEY, "15");
-    ambariProperties.setProperty(Configuration.LDAP_GROUP_SEARCH_FILTER_KEY, "16");
+    ambariProperties.setProperty(Configuration.LDAP_PRIMARY_URL.getKey(), "1");
+    ambariProperties.setProperty(Configuration.LDAP_SECONDARY_URL.getKey(), "2");
+    ambariProperties.setProperty(Configuration.LDAP_USE_SSL.getKey(), "true");
+    ambariProperties.setProperty(Configuration.LDAP_BIND_ANONYMOUSLY.getKey(), "true");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_DN.getKey(), "5");
+    ambariProperties.setProperty(Configuration.LDAP_MANAGER_PASSWORD.getKey(), passwordFilePath);
+    ambariProperties.setProperty(Configuration.LDAP_BASE_DN.getKey(), "7");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "8");
+    ambariProperties.setProperty(Configuration.LDAP_USER_BASE.getKey(), "9");
+    ambariProperties.setProperty(Configuration.LDAP_USER_OBJECT_CLASS.getKey(), "10");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_BASE.getKey(), "11");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_OBJECT_CLASS.getKey(), "12");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_MEMEBERSHIP_ATTR.getKey(), "13");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_NAMING_ATTR.getKey(), "14");
+    ambariProperties.setProperty(Configuration.LDAP_ADMIN_GROUP_MAPPING_RULES.getKey(), "15");
+    ambariProperties.setProperty(Configuration.LDAP_GROUP_SEARCH_FILTER.getKey(), "16");
 
     final LdapServerProperties ldapProperties = configuration.getLdapServerProperties();
 
@@ -476,16 +478,16 @@ public class ConfigurationTest {
     Assert.assertEquals(30, configuration.getConnectionPoolAcquisitionRetryAttempts());
     Assert.assertEquals(1000, configuration.getConnectionPoolAcquisitionRetryDelay());
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL, ConnectionPoolType.C3P0.getName());
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MIN_SIZE, "1");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_SIZE, "2");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE, "3");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_AGE, "4");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME, "5");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS, "6");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL, "7");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS, "8");
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY, "9");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL.getKey(), ConnectionPoolType.C3P0.getName());
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MIN_SIZE.getKey(), "1");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_SIZE.getKey(), "2");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_AQUISITION_SIZE.getKey(), "3");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_AGE.getKey(), "4");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME.getKey(), "5");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_MAX_IDLE_TIME_EXCESS.getKey(), "6");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_IDLE_TEST_INTERVAL.getKey(), "7");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_ATTEMPTS.getKey(), "8");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_CONNECTION_POOL_ACQUISITION_RETRY_DELAY.getKey(), "9");
 
 
     Assert.assertEquals(ConnectionPoolType.C3P0, configuration.getConnectionPoolType());
@@ -505,19 +507,19 @@ public class ConfigurationTest {
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:oracle://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:oracle://server");
     Assert.assertEquals( DatabaseType.ORACLE, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:postgres://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:postgres://server");
     Assert.assertEquals( DatabaseType.POSTGRES, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:mysql://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:mysql://server");
     Assert.assertEquals( DatabaseType.MYSQL, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:derby://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:derby://server");
     Assert.assertEquals( DatabaseType.DERBY, configuration.getDatabaseType() );
 
-    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:sqlserver://server");
+    ambariProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:sqlserver://server");
     Assert.assertEquals( DatabaseType.SQL_SERVER, configuration.getDatabaseType() );
   }
 
@@ -528,10 +530,10 @@ public class ConfigurationTest {
 
     Assert.assertEquals(100, configuration.getAgentPackageParallelCommandsLimit());
 
-    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY, "5");
+    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(), "5");
     Assert.assertEquals(5, configuration.getAgentPackageParallelCommandsLimit());
 
-    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY, "0");
+    ambariProperties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(), "0");
     Assert.assertEquals(1, configuration.getAgentPackageParallelCommandsLimit());
   }
 
@@ -543,13 +545,13 @@ public class ConfigurationTest {
     //default
     Assert.assertEquals(new Long(1000L), configuration.getExecutionSchedulerWait());
 
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "5");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "5");
     Assert.assertEquals(new Long(5000L), configuration.getExecutionSchedulerWait());
     // > 60 secs
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "100");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "100");
     Assert.assertEquals(new Long(60000L), configuration.getExecutionSchedulerWait());
     //not a number
-    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT_KEY, "100m");
+    ambariProperties.setProperty(Configuration.EXECUTION_SCHEDULER_WAIT.getKey(), "100m");
     Assert.assertEquals(new Long(1000L), configuration.getExecutionSchedulerWait());
   }
 
@@ -560,7 +562,7 @@ public class ConfigurationTest {
 
     Assert.assertFalse(configuration.isExperimentalConcurrentStageProcessingEnabled());
 
-    ambariProperties.setProperty(Configuration.EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED,
+    ambariProperties.setProperty(Configuration.EXPERIMENTAL_CONCURRENCY_STAGE_PROCESSING_ENABLED.getKey(),
         Boolean.TRUE.toString());
 
     Assert.assertTrue(configuration.isExperimentalConcurrentStageProcessingEnabled());
@@ -573,9 +575,9 @@ public class ConfigurationTest {
 
     Assert.assertFalse(configuration.isAlertCacheEnabled());
 
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_ENABLED, Boolean.TRUE.toString());
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_FLUSH_INTERVAL, "60");
-    ambariProperties.setProperty(Configuration.ALERTS_CACHE_SIZE, "1000");
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_ENABLED.getKey(), Boolean.TRUE.toString());
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_FLUSH_INTERVAL.getKey(), "60");
+    ambariProperties.setProperty(Configuration.ALERTS_CACHE_SIZE.getKey(), "1000");
 
     Assert.assertTrue(configuration.isAlertCacheEnabled());
     Assert.assertEquals(60, configuration.getAlertCacheFlushInterval());
@@ -590,8 +592,8 @@ public class ConfigurationTest {
     Assert.assertEquals(2 * Runtime.getRuntime().availableProcessors(), configuration.getPropertyProvidersThreadPoolCoreSize());
     Assert.assertEquals(4 * Runtime.getRuntime().availableProcessors(), configuration.getPropertyProvidersThreadPoolMaxSize());
 
-    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE_KEY, "44");
-    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE_KEY, "22");
+    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_MAX_SIZE.getKey(), "44");
+    ambariProperties.setProperty(Configuration.PROPERTY_PROVIDER_THREADPOOL_CORE_SIZE.getKey(), "22");
 
     Assert.assertEquals(22, configuration.getPropertyProvidersThreadPoolCoreSize());
     Assert.assertEquals(44, configuration.getPropertyProvidersThreadPoolMaxSize());
@@ -602,7 +604,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE, "3000");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE.getKey(), "3000");
 
     // When
     long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
@@ -618,10 +620,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
+    Long actualCacheSize = configuration.getHostRoleCommandStatusSummaryCacheSize();
 
     // Then
-    Assert.assertEquals(actualCacheSize, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE_DEFAULT);
+    Assert.assertEquals(actualCacheSize, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_SIZE.getDefaultValue());
   }
 
   @Test
@@ -629,7 +631,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION, "60");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION.getKey(), "60");
 
     // When
     long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
@@ -645,10 +647,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
+    Long actualCacheExpiryDuration = configuration.getHostRoleCommandStatusSummaryCacheExpiryDuration();
 
     // Then
-    Assert.assertEquals(actualCacheExpiryDuration, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION_DEFAULT);
+    Assert.assertEquals(actualCacheExpiryDuration, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_EXPIRY_DURATION.getDefaultValue());
   }
 
   @Test
@@ -656,7 +658,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "true");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "true");
 
     // When
     boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
@@ -670,7 +672,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED, "false");
+    ambariProperties.setProperty(Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getKey(), "false");
 
     // When
     boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
@@ -686,10 +688,10 @@ public class ConfigurationTest {
     final Configuration configuration = new Configuration(ambariProperties);
 
     // When
-    boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
+    Boolean actualCacheEnabledConfig = configuration.getHostRoleCommandStatusSummaryCacheEnabled();
 
     // Then
-    Assert.assertEquals(actualCacheEnabledConfig, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED_DEFAULT);
+    Assert.assertEquals(actualCacheEnabledConfig, Configuration.SERVER_HRC_STATUS_SUMMARY_CACHE_ENABLED.getDefaultValue());
   }
 
   @Test
@@ -710,8 +712,8 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "test_uid");
-    ambariProperties.setProperty(Configuration.LDAP_USER_SEARCH_FILTER_KEY, "{usernameAttribute}={0}");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "test_uid");
+    ambariProperties.setProperty(Configuration.LDAP_USER_SEARCH_FILTER.getKey(), "{usernameAttribute}={0}");
 
     // When
     String actualLdapUserSearchFilter = configuration.getLdapServerProperties().getUserSearchFilter(false);
@@ -738,8 +740,8 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE_KEY, "test_uid");
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER_KEY, "{usernameAttribute}={5}");
+    ambariProperties.setProperty(Configuration.LDAP_USERNAME_ATTRIBUTE.getKey(), "test_uid");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_FILTER.getKey(), "{usernameAttribute}={5}");
 
     // When
     String actualLdapUserSearchFilter = configuration.getLdapServerProperties().getUserSearchFilter(true);
@@ -766,7 +768,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "true");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "true");
 
     // When
     boolean actual =  configuration.isLdapAlternateUserSearchEnabled();
@@ -780,7 +782,7 @@ public class ConfigurationTest {
     // Given
     final Properties ambariProperties = new Properties();
     final Configuration configuration = new Configuration(ambariProperties);
-    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED_KEY, "false");
+    ambariProperties.setProperty(Configuration.LDAP_ALT_USER_SEARCH_ENABLED.getKey(), "false");
 
     // When
     boolean actual =  configuration.isLdapAlternateUserSearchEnabled();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
index 3ad1f1f..40a11fe 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
@@ -8689,8 +8689,8 @@ public class AmbariManagementControllerTest {
     // verify change with new meta info
     Configuration configuration = injector.getInstance(Configuration.class);
     Properties properties = configuration.getProperties();
-    properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
     Configuration newConfiguration = new Configuration(properties);
 
     AmbariMetaInfo ami = new AmbariMetaInfo(newConfiguration);
@@ -8796,7 +8796,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #1: url with trailing slash, suffix preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU.getKey(), "/repodata/repomd.xml");
     Assert.assertTrue(baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("ubuntu12")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8809,7 +8809,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #2: url with trailing slash, suffix no preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT, "repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT.getKey(), "repodata/repomd.xml");
     Assert.assertTrue(baseUrl.endsWith("/") && !configuration.getRepoValidationSuffixes("redhat6")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8835,7 +8835,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #4: url with no trailing slash, suffix preceding slash
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT, "/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_DEFAULT.getKey(), "/repodata/repomd.xml");
     Assert.assertTrue(!baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("suse11")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     try {
@@ -8848,7 +8848,7 @@ public class AmbariManagementControllerTest {
     }
 
     // variation #5: multiple suffix tests
-    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/foo/bar.xml,/repodata/repomd.xml");
+    backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU.getKey(), "/foo/bar.xml,/repodata/repomd.xml");
     Assert.assertTrue(configuration.getRepoValidationSuffixes("ubuntu12").length > 1);
     request.setBaseUrl(baseUrl);
     try {
@@ -9293,14 +9293,12 @@ public class AmbariManagementControllerTest {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-
-        properties.setProperty(Configuration.METADATA_DIR_PATH,
-            "src/test/resources/stacks");
-        properties.setProperty(Configuration.SERVER_VERSION_FILE,
-            "../version");
-        properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-        properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+        properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+
+        properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(),"src/test/resources/stacks");
+        properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(),"../version");
+        properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+        properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
         try {
           install(new ControllerModule(properties));
         } catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
index 0f5224d..73b5b75 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/BackgroundCustomCommandExecutionTest.java
@@ -26,8 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionManager;
 import org.apache.ambari.server.actionmanager.ExecutionCommandWrapper;
@@ -59,11 +57,13 @@ import org.mockito.Captor;
 import org.mockito.Mock;
 import org.mockito.Mockito;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
-import org.springframework.security.core.context.SecurityContextHolder;
+
+import junit.framework.Assert;
 
 @RunWith(MockitoJUnitRunner.class)
 public class BackgroundCustomCommandExecutionTest {
@@ -72,39 +72,39 @@ public class BackgroundCustomCommandExecutionTest {
   private Clusters clusters;
 
   private static final String REQUEST_CONTEXT_PROPERTY = "context";
-  
+
   @Captor ArgumentCaptor<Request> requestCapture;
   @Mock ActionManager am;
-  
+
   @Before
   public void setup() throws Exception {
     Configuration configuration;
     TopologyManager topologyManager;
 
     InMemoryDefaultTestModule module = new InMemoryDefaultTestModule(){
-      
-      
+
+
       @Override
       protected void configure() {
-        getProperties().put(Configuration.CUSTOM_ACTION_DEFINITION_KEY, "src/main/resources/custom_action_definitions");
+        getProperties().put(Configuration.CUSTOM_ACTION_DEFINITION.getKey(), "src/main/resources/custom_action_definitions");
         super.configure();
         bind(ActionManager.class).toInstance(am);
       }
     };
     injector = Guice.createInjector(module);
-    
-    
+
+
     injector.getInstance(GuiceJpaInitializer.class);
     controller = injector.getInstance(AmbariManagementController.class);
     clusters = injector.getInstance(Clusters.class);
     configuration = injector.getInstance(Configuration.class);
     topologyManager = injector.getInstance(TopologyManager.class);
-    
+
     Assert.assertEquals("src/main/resources/custom_action_definitions", configuration.getCustomActionDefinitionPath());
 
     StageUtils.setTopologyManager(topologyManager);
     StageUtils.setConfiguration(configuration);
-    
+
     // Set the authenticated user
     // TODO: remove this or replace the authenticated user to test authorization rules
     // Set the authenticated user
@@ -122,7 +122,7 @@ public class BackgroundCustomCommandExecutionTest {
   public void testRebalanceHdfsCustomCommand() {
     try {
       createClusterFixture();
-      
+
       Map<String, String> requestProperties = new HashMap<String, String>() {
         {
           put(REQUEST_CONTEXT_PROPERTY, "Refresh YARN Capacity Scheduler");
@@ -134,9 +134,9 @@ public class BackgroundCustomCommandExecutionTest {
       ExecuteActionRequest actionRequest = new ExecuteActionRequest("c1",
           "REBALANCEHDFS", new HashMap<String, String>(), false);
       actionRequest.getResourceFilters().add(new RequestResourceFilter("HDFS", "NAMENODE",Collections.singletonList("c6401")));
-      
+
       controller.createAction(actionRequest, requestProperties);
-      
+
       Mockito.verify(am, Mockito.times(1)).sendActions(requestCapture.capture(), any(ExecuteActionRequest.class));
 
       Request request = requestCapture.getValue();
@@ -144,34 +144,34 @@ public class BackgroundCustomCommandExecutionTest {
       Assert.assertNotNull(request.getStages());
       Assert.assertEquals(1, request.getStages().size());
       Stage stage = request.getStages().iterator().next();
-      
+
       System.out.println(stage);
-      
+
       Assert.assertEquals(1, stage.getHosts().size());
-      
+
       List<ExecutionCommandWrapper> commands = stage.getExecutionCommands("c6401");
       Assert.assertEquals(1, commands.size());
-      
+
       ExecutionCommand command = commands.get(0).getExecutionCommand();
-      
+
       Assert.assertEquals(AgentCommandType.BACKGROUND_EXECUTION_COMMAND, command.getCommandType());
       Assert.assertEquals("{\"threshold\":13}", command.getCommandParams().get("namenode"));
-      
+
     } catch (Exception e) {
       Assert.fail(e.getMessage());
     }
   }
-  
+
   private void createClusterFixture() throws AmbariException, AuthorizationException {
     createCluster("c1");
     addHost("c6401","c1");
     addHost("c6402","c1");
-    
+
     clusters.getCluster("c1");
     createService("c1", "HDFS", null);
-    
+
     createServiceComponent("c1","HDFS","NAMENODE", State.INIT);
-    
+
     createServiceComponentHost("c1","HDFS","NAMENODE","c6401", null);
   }
   private void addHost(String hostname, String clusterName) throws AmbariException {
@@ -187,7 +187,7 @@ public class BackgroundCustomCommandExecutionTest {
     Map<String, String> hostAttributes = new HashMap<String, String>();
     hostAttributes.put("os_family", osFamily);
     hostAttributes.put("os_release_version", osVersion);
-    
+
     host.setHostAttributes(hostAttributes);
   }
 
@@ -195,7 +195,7 @@ public class BackgroundCustomCommandExecutionTest {
     ClusterRequest r = new ClusterRequest(null, clusterName, State.INSTALLED.name(), SecurityType.NONE, "HDP-2.0.6", null);
     controller.createCluster(r);
   }
-  
+
   private void createService(String clusterName,
       String serviceName, State desiredState) throws AmbariException, AuthorizationException {
     String dStateStr = null;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
index 93dff82..1a66cc7 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AlertResourceProviderTest.java
@@ -18,7 +18,7 @@
 package org.apache.ambari.server.controller.internal;
 
 import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMORY_URL;
-import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMROY_DRIVER;
+import static org.apache.ambari.server.configuration.Configuration.JDBC_IN_MEMORY_DRIVER;
 import static org.easymock.EasyMock.capture;
 import static org.easymock.EasyMock.createMock;
 import static org.easymock.EasyMock.expect;
@@ -734,10 +734,10 @@ public class AlertResourceProviderTest {
       binder.bind(Configuration.class).toInstance(configuration);
 
       expect(configuration.getDatabaseUrl()).andReturn(JDBC_IN_MEMORY_URL).anyTimes();
-      expect(configuration.getDatabaseDriver()).andReturn(JDBC_IN_MEMROY_DRIVER).anyTimes();
+      expect(configuration.getDatabaseDriver()).andReturn(JDBC_IN_MEMORY_DRIVER).anyTimes();
       expect(configuration.getDatabaseUser()).andReturn("test").anyTimes();
       expect(configuration.getDatabasePassword()).andReturn("test").anyTimes();
-      expect(configuration.getAlertEventPublisherPoolSize()).andReturn(Integer.valueOf(Configuration.ALERTS_EXECUTION_SCHEDULER_THREADS_DEFAULT)).anyTimes();
+      expect(configuration.getAlertEventPublisherPoolSize()).andReturn(Integer.valueOf(Configuration.ALERTS_EXECUTION_SCHEDULER_THREADS.getDefaultValue())).anyTimes();
       expect(configuration.getMasterKeyLocation()).andReturn(new File("/test")).anyTimes();
       expect(configuration.getTemporaryKeyStoreRetentionMinutes()).andReturn(2l).anyTimes();
       expect(configuration.isActivelyPurgeTemporaryKeyStore()).andReturn(true).anyTimes();

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
index f0bddf8..5359f69 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClientConfigResourceProviderTest.java
@@ -71,7 +71,6 @@ import org.apache.ambari.server.state.ServiceInfo;
 import org.apache.ambari.server.state.ServiceOsSpecific;
 import org.apache.ambari.server.state.StackId;
 import org.apache.ambari.server.utils.StageUtils;
-import org.easymock.EasyMock;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -256,8 +255,8 @@ public class ClientConfigResourceProviderTest {
     responses.add(shr1);
 
     Map<String, String> returnConfigMap = new HashMap<String, String>();
-    returnConfigMap.put(Configuration.SERVER_TMP_DIR_KEY, Configuration.SERVER_TMP_DIR_DEFAULT);
-    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP_KEY, Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    returnConfigMap.put(Configuration.SERVER_TMP_DIR.getKey(), Configuration.SERVER_TMP_DIR.getDefaultValue());
+    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP.getKey(), Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
 
     // set expectations
     expect(managementController.getConfigHelper()).andReturn(configHelper);
@@ -265,19 +264,17 @@ public class ClientConfigResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(clusters.getCluster(clusterName)).andReturn(cluster).anyTimes();
     expect(configHelper.getEffectiveConfigProperties(cluster, configTags)).andReturn(properties);
-    expect(clusterConfig.getType()).andReturn(Configuration.HIVE_CONFIG_TAG).anyTimes();
     expect(configHelper.getEffectiveConfigAttributes(cluster, configTags)).andReturn(attributes);
-    expect(configMap.get(Configuration.SERVER_TMP_DIR_KEY)).andReturn(Configuration.SERVER_TMP_DIR_DEFAULT);
-    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP_KEY)).andReturn(Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    expect(configMap.get(Configuration.SERVER_TMP_DIR.getKey())).andReturn(Configuration.SERVER_TMP_DIR.getDefaultValue());
+    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP.getKey())).andReturn(Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
     expect(configuration.getConfigsMap()).andReturn(returnConfigMap);
     expect(configuration.getResourceDirPath()).andReturn(stackRoot);
     expect(configuration.getJavaVersion()).andReturn(8);
     expect(configuration.areHostsSysPrepped()).andReturn("false");
     expect(configuration.isAgentStackRetryOnInstallEnabled()).andReturn("false");
     expect(configuration.getAgentStackRetryOnInstallCount()).andReturn("5");
-    expect(configuration.getExternalScriptTimeout()).andReturn(Integer.parseInt(Configuration.EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
+    expect(configuration.getExternalScriptTimeout()).andReturn(Configuration.EXTERNAL_SCRIPT_TIMEOUT.getDefaultValue());
     Map<String,String> props = new HashMap<String, String>();
-    props.put(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY, "pass");
     props.put("key","value");
     expect(clusterConfig.getProperties()).andReturn(props);
     expect(configHelper.getEffectiveDesiredTags(cluster, hostName)).andReturn(allConfigTags);
@@ -315,6 +312,7 @@ public class ClientConfigResourceProviderTest {
     expect(componentInfo.getCommandScript()).andReturn(commandScriptDefinition);
     expect(componentInfo.getClientConfigFiles()).andReturn(clientConfigFileDefinitionList);
     expect(cluster.getConfig("hive-site", null)).andReturn(clusterConfig);
+    expect(clusterConfig.getType()).andReturn("hive-site").anyTimes();
     expect(cluster.getDesiredConfigs()).andReturn(desiredConfigMap);
     expect(clusters.getHost(hostName)).andReturn(host);
 
@@ -458,8 +456,8 @@ public class ClientConfigResourceProviderTest {
     responses.add(shr1);
 
     Map<String, String> returnConfigMap = new HashMap<String, String>();
-    returnConfigMap.put(Configuration.SERVER_TMP_DIR_KEY, Configuration.SERVER_TMP_DIR_DEFAULT);
-    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP_KEY, Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    returnConfigMap.put(Configuration.SERVER_TMP_DIR.getKey(), Configuration.SERVER_TMP_DIR.getDefaultValue());
+    returnConfigMap.put(Configuration.AMBARI_PYTHON_WRAP.getKey(), Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
 
     // set expectations
     expect(managementController.getConfigHelper()).andReturn(configHelper);
@@ -467,20 +465,18 @@ public class ClientConfigResourceProviderTest {
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
     expect(clusters.getCluster(clusterName)).andReturn(cluster).anyTimes();
     expect(configHelper.getEffectiveConfigProperties(cluster, configTags)).andReturn(properties);
-    expect(clusterConfig.getType()).andReturn(Configuration.HIVE_CONFIG_TAG).anyTimes();
     expect(configHelper.getEffectiveConfigAttributes(cluster, configTags)).andReturn(attributes);
-    expect(configMap.get(Configuration.SERVER_TMP_DIR_KEY)).andReturn(Configuration.SERVER_TMP_DIR_DEFAULT);
-    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP_KEY)).andReturn(Configuration.AMBARI_PYTHON_WRAP_DEFAULT);
+    expect(configMap.get(Configuration.SERVER_TMP_DIR.getKey())).andReturn(Configuration.SERVER_TMP_DIR.getDefaultValue());
+    expect(configMap.get(Configuration.AMBARI_PYTHON_WRAP.getKey())).andReturn(Configuration.AMBARI_PYTHON_WRAP.getDefaultValue());
     expect(configuration.getConfigsMap()).andReturn(returnConfigMap);
     expect(configuration.getResourceDirPath()).andReturn("/var/lib/ambari-server/src/main/resources");
     expect(configuration.getJavaVersion()).andReturn(8);
     expect(configuration.areHostsSysPrepped()).andReturn("false");
     expect(configuration.isAgentStackRetryOnInstallEnabled()).andReturn("false");
     expect(configuration.getAgentStackRetryOnInstallCount()).andReturn("5");
-    expect(configuration.getExternalScriptTimeout()).andReturn(Integer.parseInt(Configuration.EXTERNAL_SCRIPT_TIMEOUT_DEFAULT));
+    expect(configuration.getExternalScriptTimeout()).andReturn(Configuration.EXTERNAL_SCRIPT_TIMEOUT.getDefaultValue());
 
     Map<String,String> props = new HashMap<String, String>();
-    props.put(Configuration.HIVE_METASTORE_PASSWORD_PROPERTY, "pass");
     props.put("key","value");
     expect(clusterConfig.getProperties()).andReturn(props);
     expect(configHelper.getEffectiveDesiredTags(cluster, hostName)).andReturn(allConfigTags);
@@ -518,6 +514,7 @@ public class ClientConfigResourceProviderTest {
     expect(componentInfo.getCommandScript()).andReturn(commandScriptDefinition);
     expect(componentInfo.getClientConfigFiles()).andReturn(clientConfigFileDefinitionList);
     expect(cluster.getConfig("hive-site", null)).andReturn(clusterConfig);
+    expect(clusterConfig.getType()).andReturn("hive-site").anyTimes();
     expect(cluster.getDesiredConfigs()).andReturn(desiredConfigMap);
     expect(clusters.getHost(hostName)).andReturn(host);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
index 6737d7d..a521139 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
@@ -111,6 +111,8 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
 
 import com.google.gson.JsonArray;
 import com.google.gson.JsonObject;
@@ -120,8 +122,6 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
 import com.google.inject.util.Modules;
-import org.springframework.security.core.Authentication;
-import org.springframework.security.core.context.SecurityContextHolder;
 
 
  /**
@@ -171,7 +171,7 @@ public class ClusterStackVersionResourceProviderTest {
     configHelper = createNiceMock(ConfigHelper.class);
     InMemoryDefaultTestModule inMemoryModule = new InMemoryDefaultTestModule();
     Properties properties = inMemoryModule.getProperties();
-    properties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT_KEY,
+    properties.setProperty(Configuration.AGENT_PACKAGE_PARALLEL_COMMANDS_LIMIT.getKey(),
             String.valueOf(MAX_TASKS_PER_STAGE));
     configuration = new Configuration(properties);
     stageFactory = createNiceMock(StageFactory.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
index df4d8ed..3116a80 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
@@ -18,10 +18,21 @@
 
 package org.apache.ambari.server.controller.internal;
 
-import com.google.inject.AbstractModule;
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+import java.io.File;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.AmbariManagementController;
 import org.apache.ambari.server.controller.ResourceProviderFactory;
@@ -49,15 +60,11 @@ import org.junit.rules.TemporaryFolder;
 import org.springframework.security.core.Authentication;
 import org.springframework.security.core.context.SecurityContextHolder;
 
-import java.io.File;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.*;
+import junit.framework.Assert;
 
 
 /**
@@ -82,8 +89,8 @@ public class CredentialResourceProviderTest {
       protected void configure() {
         Properties properties = new Properties();
 
-        properties.setProperty(Configuration.MASTER_KEY_LOCATION, tmpFolder.getRoot().getAbsolutePath());
-        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION, tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEY_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
+        properties.setProperty(Configuration.MASTER_KEYSTORE_LOCATION.getKey(), tmpFolder.getRoot().getAbsolutePath());
 
         bind(CredentialStoreService.class).to(CredentialStoreServiceImpl.class);
 
@@ -347,7 +354,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -423,7 +430,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -564,7 +571,7 @@ public class CredentialResourceProviderTest {
     // end expectations
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(
@@ -620,9 +627,9 @@ public class CredentialResourceProviderTest {
 
     replay(request, factory, managementController);
     // end expectations
-    
+
     SecurityContextHolder.getContext().setAuthentication(authentication);
-    
+
     AbstractControllerResourceProvider.init(factory);
 
     ResourceProvider provider = AbstractControllerResourceProvider.getResourceProvider(

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
index f148da1..2702fdf 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/utilities/DatabaseCheckerTest.java
@@ -69,9 +69,9 @@ public class DatabaseCheckerTest {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
     String serverVersion = ambariMetaInfo.getServerVersion();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
     metainfoEntity.setMetainfoValue(serverVersion);
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;
@@ -88,9 +88,9 @@ public class DatabaseCheckerTest {
   public void testCheckDBVersionInvalid() throws Exception {
     MetainfoDAO metainfoDAO =  createMock(MetainfoDAO.class);
     MetainfoEntity metainfoEntity = new MetainfoEntity();
-    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION_KEY);
+    metainfoEntity.setMetainfoName(Configuration.SERVER_VERSION.getKey());
     metainfoEntity.setMetainfoValue("0.0.0"); // Incompatible version
-    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION_KEY)).
+    expect(metainfoDAO.findByKey(Configuration.SERVER_VERSION.getKey())).
       andReturn(metainfoEntity);
     replay(metainfoDAO);
     DatabaseChecker.metainfoDAO = metainfoDAO;

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java b/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
index 4f06ee2..95f9a0c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/notifications/DispatchFactoryTest.java
@@ -50,10 +50,10 @@ public class DispatchFactoryTest {
     Integer snmpPort = 30111;
 
     Properties properties = new Properties();
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY,"in-memory");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos6");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY,sourceResourceDirectory);
-    properties.setProperty(Configuration.ALERTS_SNMP_DISPATCH_UDP_PORT,snmpPort.toString());
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(),"in-memory");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos6");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(),sourceResourceDirectory);
+    properties.setProperty(Configuration.ALERTS_SNMP_DISPATCH_UDP_PORT.getKey(),snmpPort.toString());
 
     Injector injector = Guice.createInjector(new AuditLoggerModule(), new ControllerModule(properties));
     DispatchFactory dispatchFactory = injector.getInstance(DispatchFactory.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
index 1ca486e..e327a04 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/InMemoryDefaultTestModule.java
@@ -71,24 +71,24 @@ public class InMemoryDefaultTestModule extends AbstractModule {
       sharedResourcesDir = ClassLoader.getSystemClassLoader().getResource("").getPath();
     }
 
-    if (!properties.containsKey(Configuration.SERVER_PERSISTENCE_TYPE_KEY)) {
-      properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
+    if (!properties.containsKey(Configuration.SERVER_PERSISTENCE_TYPE.getKey())) {
+      properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
     }
 
-    if (!properties.containsKey(Configuration.METADATA_DIR_PATH)) {
-      properties.setProperty(Configuration.METADATA_DIR_PATH, stacks);
+    if (!properties.containsKey(Configuration.METADATA_DIR_PATH.getKey())) {
+      properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), stacks);
     }
 
-    if (!properties.containsKey(Configuration.SERVER_VERSION_FILE)) {
-      properties.setProperty(Configuration.SERVER_VERSION_FILE, version);
+    if (!properties.containsKey(Configuration.SERVER_VERSION_FILE.getKey())) {
+      properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), version);
     }
 
-    if (!properties.containsKey(Configuration.OS_VERSION_KEY)) {
-      properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
+    if (!properties.containsKey(Configuration.OS_VERSION.getKey())) {
+      properties.setProperty(Configuration.OS_VERSION.getKey(), "centos5");
     }
 
-    if (!properties.containsKey(Configuration.SHARED_RESOURCES_DIR_KEY)) {
-      properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, sharedResourcesDir);
+    if (!properties.containsKey(Configuration.SHARED_RESOURCES_DIR.getKey())) {
+      properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), sharedResourcesDir);
     }
 
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
index 1fac11b..20c0388 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/orm/JdbcPropertyTest.java
@@ -19,8 +19,6 @@ package org.apache.ambari.server.orm;
 
 import java.util.Properties;
 
-import com.google.inject.persist.PersistService;
-
 import org.apache.ambari.server.audit.AuditLoggerModule;
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.controller.ControllerModule;
@@ -32,6 +30,7 @@ import org.junit.Test;
 
 import com.google.inject.Guice;
 import com.google.inject.Injector;
+import com.google.inject.persist.PersistService;
 
 public class JdbcPropertyTest {
   Properties properties;
@@ -40,11 +39,11 @@ public class JdbcPropertyTest {
   @Before
   public void configure() {
     properties = new Properties();
-    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE_KEY, "in-memory");
-    properties.setProperty(Configuration.METADATA_DIR_PATH, "src/test/resources/stacks");
-    properties.setProperty(Configuration.SERVER_VERSION_FILE, "src/test/resources/version");
-    properties.setProperty(Configuration.OS_VERSION_KEY, "centos5");
-    properties.setProperty(Configuration.SHARED_RESOURCES_DIR_KEY, "src/test/resources/");
+    properties.setProperty(Configuration.SERVER_PERSISTENCE_TYPE.getKey(), "in-memory");
+    properties.setProperty(Configuration.METADATA_DIR_PATH.getKey(), "src/test/resources/stacks");
+    properties.setProperty(Configuration.SERVER_VERSION_FILE.getKey(), "src/test/resources/version");
+    properties.setProperty(Configuration.OS_VERSION.getKey(), "centos5");
+    properties.setProperty(Configuration.SHARED_RESOURCES_DIR.getKey(), "src/test/resources/");
   }
 
   @After

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java b/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
index 509a2ec..004975e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/resources/TestResources.java
@@ -18,13 +18,13 @@
 
 package org.apache.ambari.server.resources;
 
+import static org.easymock.EasyMock.createNiceMock;
+
 import java.io.File;
 import java.io.IOException;
 import java.lang.reflect.Constructor;
 import java.util.Properties;
 
-import junit.framework.TestCase;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.apache.ambari.server.state.stack.OsFamily;
 import org.apache.commons.io.FileUtils;
@@ -38,25 +38,25 @@ import com.google.inject.Guice;
 import com.google.inject.Inject;
 import com.google.inject.Injector;
 
-import static org.easymock.EasyMock.createNiceMock;
+import junit.framework.TestCase;
 
 public class TestResources extends TestCase {
-	
+
   private static ResourceManager resMan;
   private static final String RESOURCE_FILE_NAME = "resources.ext";
   private static final String RESOURCE_FILE_CONTENT = "CONTENT";
   Injector injector;
   private TemporaryFolder tempFolder = new TemporaryFolder();
   private File resourceFile;
-  
+
   protected Properties buildTestProperties() {
-	   
+
 	Properties properties = new Properties();
     try {
 		tempFolder.create();
-		
-		properties.setProperty(Configuration.SRVR_KSTR_DIR_KEY, tempFolder.getRoot().getAbsolutePath());
-		properties.setProperty(Configuration.RESOURCES_DIR_KEY, tempFolder.getRoot().getAbsolutePath());
+
+		properties.setProperty(Configuration.SRVR_KSTR_DIR.getKey(), tempFolder.getRoot().getAbsolutePath());
+		properties.setProperty(Configuration.RESOURCES_DIR.getKey(), tempFolder.getRoot().getAbsolutePath());
 
 	    resourceFile = tempFolder.newFile(RESOURCE_FILE_NAME);
 	    FileUtils.writeStringToFile(resourceFile, RESOURCE_FILE_CONTENT);
@@ -65,7 +65,7 @@ public class TestResources extends TestCase {
 	}
     return properties;
   }
-  
+
   protected Constructor<Configuration> getConfigurationConstructor() {
     try {
 	  return Configuration.class.getConstructor(Properties.class);
@@ -89,18 +89,20 @@ public class TestResources extends TestCase {
     resMan = instance;
   }
 
+  @Override
   @Before
   public void setUp() throws IOException {
     injector = Guice.createInjector(new ResourceModule());
     resMan = injector.getInstance(ResourceManager.class);
   }
-	
+
+  @Override
   @After
   public void tearDown() throws IOException {
     resourceFile.delete();
 	tempFolder.delete();
   }
-	
+
   @Test
   public void testGetResource() throws Exception {
     File resFile = resMan.getResource(resourceFile.getName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
index 860e647..f2fe3b8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionScheduleManagerTest.java
@@ -17,16 +17,26 @@
  */
 package org.apache.ambari.server.scheduler;
 
-import com.google.gson.Gson;
-import com.google.inject.Binder;
-import com.google.inject.Guice;
-import com.google.inject.Inject;
-import com.google.inject.Injector;
-import com.google.inject.Module;
-import com.google.inject.persist.PersistService;
-import com.google.inject.persist.Transactional;
-import com.google.inject.util.Modules;
-import junit.framework.Assert;
+import static org.easymock.EasyMock.anyObject;
+import static org.easymock.EasyMock.capture;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.createMockBuilder;
+import static org.easymock.EasyMock.createNiceMock;
+import static org.easymock.EasyMock.eq;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.ambari.server.AmbariException;
 import org.apache.ambari.server.actionmanager.ActionDBAccessor;
 import org.apache.ambari.server.actionmanager.HostRoleStatus;
@@ -66,26 +76,17 @@ import org.quartz.impl.matchers.GroupMatcher;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import com.google.gson.Gson;
+import com.google.inject.Binder;
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.Injector;
+import com.google.inject.Module;
+import com.google.inject.persist.PersistService;
+import com.google.inject.persist.Transactional;
+import com.google.inject.util.Modules;
 
-import static org.easymock.EasyMock.anyObject;
-import static org.easymock.EasyMock.capture;
-import static org.easymock.EasyMock.createMock;
-import static org.easymock.EasyMock.createMockBuilder;
-import static org.easymock.EasyMock.createNiceMock;
-import static org.easymock.EasyMock.eq;
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-import static org.easymock.EasyMock.replay;
-import static org.easymock.EasyMock.verify;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
+import junit.framework.Assert;
 
 public class ExecutionScheduleManagerTest {
   private Clusters clusters;
@@ -97,7 +98,6 @@ public class ExecutionScheduleManagerTest {
   private RequestExecutionFactory requestExecutionFactory;
   private ExecutionScheduler executionScheduler;
   private Scheduler scheduler;
-  Properties properties;
 
   private static final Logger LOG =
     LoggerFactory.getLogger(ExecutionScheduleManagerTest.class);
@@ -105,7 +105,6 @@ public class ExecutionScheduleManagerTest {
   @Before
   public void setup() throws Exception {
     InMemoryDefaultTestModule defaultTestModule = new InMemoryDefaultTestModule();
-    properties = defaultTestModule.getProperties();
     injector  = Guice.createInjector(Modules.override(defaultTestModule)
       .with(new ExecutionSchedulerTestModule()));
     injector.getInstance(GuiceJpaInitializer.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
index 8346c65..c49d799 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/scheduler/ExecutionSchedulerTest.java
@@ -25,8 +25,6 @@ import static org.powermock.api.easymock.PowerMock.expectPrivate;
 
 import java.util.Properties;
 
-import junit.framework.Assert;
-
 import org.apache.ambari.server.configuration.Configuration;
 import org.junit.After;
 import org.junit.Before;
@@ -39,6 +37,8 @@ import org.powermock.modules.junit4.PowerMockRunner;
 import org.quartz.Scheduler;
 import org.quartz.impl.StdSchedulerFactory;
 
+import junit.framework.Assert;
+
 @RunWith(PowerMockRunner.class)
 @PowerMockIgnore("javax.management.*")
 public class ExecutionSchedulerTest {
@@ -48,13 +48,13 @@ public class ExecutionSchedulerTest {
   @Before
   public void setup() throws Exception {
     Properties properties = new Properties();
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_THREADS_KEY, "2");
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CLUSTERED_KEY, "false");
-    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CONNECTIONS_KEY, "2");
-    properties.setProperty(Configuration.SERVER_JDBC_DRIVER_KEY, "db.driver");
-    properties.setProperty(Configuration.SERVER_JDBC_URL_KEY, "jdbc:postgresql://localhost/");
-    properties.setProperty(Configuration.SERVER_JDBC_USER_NAME_KEY, "user");
-    properties.setProperty(Configuration.SERVER_DB_NAME_KEY, "derby");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_THREADS.getKey(), "2");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CLUSTERED.getKey(), "false");
+    properties.setProperty(Configuration.EXECUTION_SCHEDULER_CONNECTIONS.getKey(), "2");
+    properties.setProperty(Configuration.SERVER_JDBC_DRIVER.getKey(), "db.driver");
+    properties.setProperty(Configuration.SERVER_JDBC_URL.getKey(), "jdbc:postgresql://localhost/");
+    properties.setProperty(Configuration.SERVER_JDBC_USER_NAME.getKey(), "user");
+    properties.setProperty(Configuration.SERVER_DB_NAME.getKey(), "derby");
 
     configuration = new Configuration(properties);
 
@@ -113,9 +113,9 @@ public class ExecutionSchedulerTest {
   @Test
   public void testGetQuartzDbDelegateClassAndValidationQuery() throws Exception {
     Properties testProperties = new Properties();
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:postgresql://host:port/dbname");
-    testProperties.setProperty(Configuration.SERVER_DB_NAME_KEY, "ambari");
+    testProperties.setProperty(Configuration.SERVER_DB_NAME.getKey(), "ambari");
     Configuration configuration1 = new Configuration(testProperties);
     ExecutionSchedulerImpl executionScheduler =
       spy(new ExecutionSchedulerImpl(configuration1));
@@ -126,7 +126,7 @@ public class ExecutionSchedulerTest {
     Assert.assertEquals("org.quartz.impl.jdbcjobstore.PostgreSQLDelegate", subProps[0]);
     Assert.assertEquals("select 0", subProps[1]);
 
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:mysql://host:port/dbname");
     configuration1 = new Configuration(testProperties);
     executionScheduler = spy(new ExecutionSchedulerImpl(configuration1));
@@ -136,7 +136,7 @@ public class ExecutionSchedulerTest {
     Assert.assertEquals("org.quartz.impl.jdbcjobstore.StdJDBCDelegate", subProps[0]);
     Assert.assertEquals("select 0", subProps[1]);
 
-    testProperties.setProperty(Configuration.SERVER_JDBC_URL_KEY,
+    testProperties.setProperty(Configuration.SERVER_JDBC_URL.getKey(),
       "jdbc:oracle:thin://host:port/dbname");
     configuration1 = new Configuration(testProperties);
     executionScheduler = spy(new ExecutionSchedulerImpl(configuration1));

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
index 48231b7..7be70a3 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AbstractSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expectLastCall;
+
 import java.io.File;
 import java.util.Map;
 import java.util.Properties;
@@ -42,8 +44,6 @@ import com.google.inject.Injector;
 
 import junit.framework.Assert;
 
-import static org.easymock.EasyMock.expectLastCall;
-
 public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
 
   @Rule
@@ -78,7 +78,7 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "false");
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "false");
 
         bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
         bind(Configuration.class).toInstance(new Configuration(properties));
@@ -120,9 +120,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
 
         bind(OsFamily.class).toInstance(createNiceMock(OsFamily.class));
         bind(Configuration.class).toInstance(new Configuration(properties));
@@ -166,8 +166,8 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "custom1");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "custom2");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "custom3");
@@ -212,9 +212,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "custom1");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "custom2");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "custom3");
@@ -261,8 +261,8 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "");
@@ -303,9 +303,9 @@ public abstract class AbstractSecurityHeaderFilterTest extends EasyMockSupport {
       @Override
       protected void configure() {
         Properties properties = new Properties();
-        properties.setProperty(Configuration.API_USE_SSL, "true");
-        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME_KEY, httpPassFile.getParent());
-        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME_KEY, httpPassFile.getName());
+        properties.setProperty(Configuration.API_USE_SSL.getKey(), "true");
+        properties.setProperty(Configuration.CLIENT_API_SSL_KSTR_DIR_NAME.getKey(), httpPassFile.getParent());
+        properties.setProperty(Configuration.CLIENT_API_SSL_CRT_PASS_FILE_NAME.getKey(), httpPassFile.getName());
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER), "");
         properties.setProperty(propertyNameMap.get(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER), "");

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
index e6a8eff..6537130 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariServerSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expect;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,8 +28,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.ambari.server.configuration.Configuration;
 
-import static org.easymock.EasyMock.expect;
-
 public class AmbariServerSecurityHeaderFilterTest extends AbstractSecurityHeaderFilterTest {
 
   private static final Map<String, String> PROPERTY_NAME_MAP;
@@ -37,15 +37,15 @@ public class AmbariServerSecurityHeaderFilterTest extends AbstractSecurityHeader
 
     Map<String, String> map;
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE_KEY);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE.getKey());
     PROPERTY_NAME_MAP = Collections.unmodifiableMap(map);
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE_DEFAULT);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.HTTP_STRICT_TRANSPORT_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.HTTP_X_XSS_PROTECTION_HEADER_VALUE.getDefaultValue());
     DEFAULT_PROPERTY_VALUE_MAP = Collections.unmodifiableMap(map);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/5630b5e7/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
index a2882ae..c9d7974 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/security/AmbariViewsSecurityHeaderFilterTest.java
@@ -18,6 +18,8 @@
 
 package org.apache.ambari.server.security;
 
+import static org.easymock.EasyMock.expectLastCall;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,8 +28,6 @@ import javax.servlet.http.HttpServletRequest;
 
 import org.apache.ambari.server.configuration.Configuration;
 
-import static org.easymock.EasyMock.expectLastCall;
-
 public class AmbariViewsSecurityHeaderFilterTest extends AbstractSecurityHeaderFilterTest {
 
   private static final Map<String, String> PROPERTY_NAME_MAP;
@@ -38,15 +38,15 @@ public class AmbariViewsSecurityHeaderFilterTest extends AbstractSecurityHeaderF
     Map<String, String> map;
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE_KEY);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE_KEY);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getKey());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE.getKey());
     PROPERTY_NAME_MAP = Collections.unmodifiableMap(map);
 
     map = new HashMap<String, String>();
-    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE_DEFAULT);
-    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE_DEFAULT);
+    map.put(AbstractSecurityHeaderFilter.STRICT_TRANSPORT_HEADER, Configuration.VIEWS_HTTP_STRICT_TRANSPORT_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_FRAME_OPTIONS_HEADER, Configuration.VIEWS_HTTP_X_FRAME_OPTIONS_HEADER_VALUE.getDefaultValue());
+    map.put(AbstractSecurityHeaderFilter.X_XSS_PROTECTION_HEADER, Configuration.VIEWS_HTTP_X_XSS_PROTECTION_HEADER_VALUE.getDefaultValue());
     DEFAULT_PROPERTY_VALUE_MAP = Collections.unmodifiableMap(map);
   }
 


Mime
View raw message