@Test
    public void testDOMTikaConfig() throws Exception {
        //tests the DOM reader in TikaConfig
        //if the safeguards aren't in place, this throws a FNFE
        try (InputStream is = getResourceAsStream(
                "/org/apache/tika/config/TIKA-1558-exclude.xml")) {
            ByteArrayOutputStream bos = new ByteArrayOutputStream();
            IOUtils.copy(is, bos);
            byte[] injected = injectXML(bos.toByteArray(), XXE);
            TikaConfig tikaConfig = new TikaConfig(new ByteArrayInputStream(injected));
        }
    }
This tests for XXE in basically xml type files, straight xml and zipped
xmls, e.g. ebook and ooxml.
It does not test for XXE prevention in files that may contain xml
files, such as PDFs and other XMP-containing files.
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/parser/TestXXEInXML.java