SQLSafe { static String cleanWhiteSpace(final String value) { return value.replaceAll("[\\t\\n\\r\\f]", " "); } private  SQLSafe();   }
@Test void testCleanWhiteSpace() { final String dirty = "a\tb c\nd\fe"; final String cleanString = SQLSafe.cleanWhiteSpace(dirty); assertThat(cleanString).isEqualTo("a b c d e"); }