@Test public void testLdapPassword() { String testData = "ambari-server sync-ldap --all --ldap-sync-admin-name cloudbreak --ldap-sync-admin-password thisismypassword"; Assert.assertEquals("ambari-server sync-ldap --all --ldap-sync-admin-name cloudbreak --ldap-sync-admin-password " + REPLACEMENT, anonymize(testData)); }
public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); }
AnonymizerUtil { public static String anonymize(String content) { String ret = content; if (ret != null) { LOGGER.info("Anonymize the content with length: {}", content.length()); for (ReplacePattern pattern : PATTERNS) { ret = pattern.replaceAll(ret); } } return ret; } private  AnonymizerUtil(); static String anonymize(String content); static final String REPLACEMENT; }