@Test
    public void testXMLMultiThreaded() throws Exception {
        Detector detector = new Tika().getDetector();
        FileFilter filter = pathname -> pathname.getName().endsWith(".xml");
        int numThreads = 1;
        XMLReaderUtils.setPoolSize(numThreads);
        testDetector(detector, numThreads, 20, filter, numThreads * 2);
    }
Check that temporary files created by Tika are removed after
closing TikaInputStream.
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/detect/TestContainerAwareDetector.java