@Test
void testExceedingTotalEntities() throws Exception {

    // Set this to true to test limits.
    ParserConfig.secureProcessing = false;
    final SAXParserFactory factory = SAXParserFactoryFactory.newInstance();
    final XMLReader xmlReader = factory.newSAXParser().getXMLReader();
    xmlReader.parse(new InputSource(new XmlGenerator()));
}