### Question:
ConfigUtils { static String redact(String s) { return REDACT_PATTERN.matcher(s).replaceAll("$1*****"); } private  ConfigUtils(); static Config getDefault(); static Config overlayOn(Map<String,?> overlay, Config underlying); static String getOptionalString(Config config, String key); static List<String> getOptionalStringList(Config config, String key); static Double getOptionalDouble(Config config, String key); static void set(Map<String,Object> overlay, String key, Path path); static String serialize(Config config); static Config deserialize(String serialized); static String prettyPrint(Config config); static Properties keyValueToProperties(Object... keyValues);  }### Answer:
@Test public void testRedact() { String redacted = ConfigUtils.redact(" password=foo \nPassword=foo\nPASSWORD = foo\n" + " the-password= foo \nThe-Password =foo"); assertFalse(redacted.contains("foo")); assertContains(redacted, "*****"); assertContains(redacted, "password="); assertContains(redacted, "Password="); assertContains(redacted, "PASSWORD = "); assertContains(redacted, "the-password= "); assertContains(redacted, "The-Password ="); }