OkapiStringUtil { public static String removeLogCharacters(String s) { if (s == null) { return null; } return s.replaceAll("[\\n\\r\\t]", "_"); } private  OkapiStringUtil(); static String trimTrailingSlashes(CharSequence s); static String removeLogCharacters(String s);  }
@Test public void removeLogCharacters() { Assert.assertEquals(null, OkapiStringUtil.removeLogCharacters(null)); Assert.assertEquals("", OkapiStringUtil.removeLogCharacters("")); Assert.assertEquals("x", OkapiStringUtil.removeLogCharacters("x")); Assert.assertEquals("___", OkapiStringUtil.removeLogCharacters("\r\n\t")); Assert.assertEquals("|", OkapiStringUtil.removeLogCharacters("|")); }