### Question:
SecurityUtils { public static String hideCreds(String... strings) { return Stream.of(strings) .map(str -> str.replaceAll(PASS_REGEX, PASS_REPLACEMENT)) .collect(Collectors.joining(" ")); } private  SecurityUtils(); static String hideCreds(String... strings);  }### Answer:
@Test public void hideCredsTest() { String[] strings = {"bash", "-c", "\"edge_user_name\":\"edgeUserName\",\"conf_service_base_name\":\"SBN\", " + "\"password\":\"12345\""}; String actual = SecurityUtils.hideCreds(strings); String expected = "bash -c \"edge_user_name\":\"edgeUserName\",\"conf_service_base_name\":\"SBN\", " + "\"password\":\"***\""; Assert.assertEquals(expected, actual); }