### Question:
ApplicationProperties extends Properties { public void resolveAlias() throws FalconException { try { final Configuration conf = new Configuration(); String providerPath = getProperty(CREDENTIAL_PROVIDER_PROPERTY); if (providerPath != null) { conf.set(CredentialProviderHelper.CREDENTIAL_PROVIDER_PATH, providerPath); } Properties aliasProperties = new Properties(); for (Object keyObj : keySet()) { String key = (String) keyObj; if (key.startsWith(ALIAS_PROPERTY_PREFIX)) { String propertyKey = key.substring(ALIAS_PROPERTY_PREFIX.length()); String propertyValue = CredentialProviderHelper.resolveAlias(conf, getProperty(key)); aliasProperties.setProperty(propertyKey, propertyValue); } } LOG.info("Resolved alias properties: {}", aliasProperties.stringPropertyNames()); putAll(aliasProperties); } catch (Exception e) { LOG.error("Exception while resolving credential alias", e); throw new FalconException("Exception while resolving credential alias", e); } } protected  ApplicationProperties(); String getDomain(); void resolveAlias(); @Override String getProperty(String key); @Override String getProperty(String key, String defaultValue); static final String CREDENTIAL_PROVIDER_PROPERTY; static final String ALIAS_PROPERTY_PREFIX; }### Answer:
@Test public void testResolveAlias() throws Exception { Assert.assertTrue(CredentialProviderHelper.isProviderAvailable()); File file = new File(CRED_DIR, JKS_FILE_NAME); file.delete(); Configuration conf = new Configuration(); String providerPath = "jceks: conf.set(CredentialProviderHelper.CREDENTIAL_PROVIDER_PATH, providerPath); CredentialProviderHelper.createCredentialEntry(conf, ALIAS_1, PASSWORD_1); CredentialProviderHelper.createCredentialEntry(conf, ALIAS_2, PASSWORD_2); ApplicationProperties properties = new ConfigLocation(); properties.resolveAlias(); properties.put(ApplicationProperties.CREDENTIAL_PROVIDER_PROPERTY, providerPath); properties.put(ApplicationProperties.ALIAS_PROPERTY_PREFIX + PROPERTY_1, ALIAS_1); properties.put(ApplicationProperties.ALIAS_PROPERTY_PREFIX + PROPERTY_2, ALIAS_2); properties.resolveAlias(); Assert.assertEquals(properties.getProperty(PROPERTY_1), PASSWORD_1); Assert.assertEquals(properties.getProperty(PROPERTY_2), PASSWORD_2); }