@Test
    public void testManyCharactersWithoutInput() throws IOException {
        try {
            char[] ch = new char[100];
            for (int i = 0; i < 20000; i++) {
                handler.characters(ch, 0, ch.length);
            }
            fail("Expected SAXException not thrown");
        } catch (SAXException e) {
            // expected
        }
    }
Tests for the {@link SecureContentHandler} class.
tika-core/src/test/java/org/apache/tika/sax/SecureContentHandlerTest.java