### Question:
FilteredLogger { public static String filterSecrets(final String in) { String ret = in; if (ret != null && ret.length() > 0) { for (final Pattern pattern : FilteredLogger.filters) { final Matcher m = pattern.matcher(ret); ret = m.replaceAll("REMOVED"); } } if (ret == null) { ret = ""; } return ret; } protected  FilteredLogger(final String className); static String filterSecrets(final String in); static FilteredLogger getFilteredLogger(final String className); void entering(final String sourceClass, final String sourceMethod); void entering(final String sourceClass, final String sourceMethod, final Object param); void entering(final String sourceClass, final String sourceMethod, final Object[] params); ResourceBundle getResourceBundle(); boolean isLoggable(); boolean isLoggable(final Level logLevel); void log(final Level logLevel, final String msg, final Object param); void log(final Level logLevel, final String msg, final Object[] params); void log(final Level logLevel, final String msg, final Throwable thrown); void log(final String msg, final Object param); void log(final String msg, final Object[] params); void log(final String msg, final Throwable thrown); void exiting(final String sourceClass, final String sourceMethod); void exiting(final String sourceClass, final String sourceMethod, final Object result);  }### Answer:
@Test public void testFilterSecrets_1() throws Exception { final String in = "a"; final String result = FilteredLogger.filterSecrets(in); Assert.assertEquals("a", result); }
@Test public void testFilterSecrets_2() throws Exception { final String in = null; final String result = FilteredLogger.filterSecrets(in); Assert.assertEquals("", result); }
@Test public void testFilterSecrets_3() throws Exception { final String in = ""; final String result = FilteredLogger.filterSecrets(in); Assert.assertEquals("", result); }
@Test public void testFilterSecrets_4() throws Exception { final String in = "?access_token=XXX"; final String result = FilteredLogger.filterSecrets(in); Assert.assertEquals("?access_token=REMOVED", result); }
@Test public void testFilterSecrets_5() throws Exception { final String in = "Authorization: XXX"; final String result = FilteredLogger.filterSecrets(in); Assert.assertEquals("Authorization:REMOVED", result); }