### Question:
XmlTools { public static final String collapseWhitespace(final String value) { return collapseSpace(value.replace('\r', ' ').replace('\n', ' ').replace('\t', ' ').trim()); }  static final String collapseWhitespace(final String value);  }### Answer:
@Test public void testCollapseWhitespace() { String str = XmlTools.collapseWhitespace(" this\ris\na\ttest string "); assertTrue(str.equals("this is a test string")); }