### Question:
SystemProperties { public static List<String> maskJvmArgs(List<String> jvmArgs, List<String> maskSystemProperties) { if (maskSystemProperties.isEmpty()) { return jvmArgs; } List<Pattern> maskSystemPropertyPatterns = buildPatternList(maskSystemProperties); List<String> maskedJvmArgs = Lists.newArrayList(); for (String arg : jvmArgs) { maskedJvmArgs.add(maskSystemProperty(arg, maskSystemPropertyPatterns)); } return maskedJvmArgs; } private  SystemProperties(); static List<String> maskJvmArgs(List<String> jvmArgs,
            List<String> maskSystemProperties); static Map<String, String> maskSystemProperties(Map<String, String> systemProperties,
            List<String> maskSystemProperties);  }### Answer:
@Test public void shouldMaskJvmArgs() { assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of())).containsExactly("-Xmx1g", "-Dtest=one"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("test"))).containsExactly("-Xmx1g", "-Dtest=****"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("t"))).containsExactly("-Xmx1g", "-Dtest=one"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("t*"))).containsExactly("-Xmx1g", "-Dtest=****"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("e*"))).containsExactly("-Xmx1g", "-Dtest=one"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("*t*"))).containsExactly("-Xmx1g", "-Dtest=****"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-Dtest=one"), ImmutableList.<String>of("*x*"))).containsExactly("-Xmx1g", "-Dtest=one"); assertThat(SystemProperties.maskJvmArgs(ImmutableList.of("-Xmx1g", "-DtEst=one"), ImmutableList.<String>of("teSt"))).containsExactly("-Xmx1g", "-DtEst=****"); }