@Test public void testCmTemplatePasswordOneLine() { String testData = "{\"name\": \"hive-hive_metastore_database_password\",\"value\": \"Horton01\"},"; String expectedData = "{\"name\": \"hive-hive_metastore_database_password\",\"value\": \"" + REPLACEMENT + "\"},"; Assert.assertEquals(expectedData, 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; }