@Test
    public void testInvalidWhitespace() throws SAXException {
        safe.ignorableWhitespace("ab\u0000".toCharArray(), 0, 3);
        safe.ignorableWhitespace("a\u0001c".toCharArray(), 0, 3);
        safe.ignorableWhitespace("\u0002bc".toCharArray(), 0, 3);
        assertEquals("ab\ufffda\ufffdc\ufffdbc", output.toString());
    }
Unit tests for the {@link SafeContentHandler} class.
tika-core/src/test/java/org/apache/tika/sax/SafeContentHandlerTest.java