@Test
public void testIgnore() throws Exception {

    Parser p = new MockParser(OVER_DEFAULT);
    ContentHandler handler =
            new BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE.IGNORE, -1).getNewContentHandler();
    assertTrue(handler instanceof DefaultHandler);
    p.parse(null, handler, null, null);
    //unfortunatley, the DefaultHandler does not return "",
    assertContains("org.xml.sax.helpers.DefaultHandler", handler.toString());
    //tests that no write limit exception is thrown
    p = new MockParser(100);
    handler =
            new BasicContentHandlerFactory(BasicContentHandlerFactory.HANDLER_TYPE.IGNORE, 5).getNewContentHandler();
    assertTrue(handler instanceof DefaultHandler);
    p.parse(null, handler, null, null);
    assertContains("org.xml.sax.helpers.DefaultHandler", handler.toString());
}