@Test
    public void testDetectorExcludeFromDefault() throws Exception {
        TikaConfig config = getConfig("TIKA-1702-detector-exclude.xml");
        assertNotNull(config.getParser());
        assertNotNull(config.getDetector());
        CompositeDetector detector = (CompositeDetector) config.getDetector();

        // Should be wrapping two detectors
        assertEquals(2, detector.getDetectors().size());


        // First should be DefaultDetector, second Empty, that order
        assertEquals(DefaultDetector.class, detector.getDetectors().get(0).getClass());
        assertEquals(EmptyDetector.class, detector.getDetectors().get(1).getClass());


        // Get the DefaultDetector from the config
        DefaultDetector confDetector = (DefaultDetector) detector.getDetectors().get(0);

        // Get a fresh "default" DefaultParser
        DefaultDetector normDetector = new DefaultDetector(config.getMimeRepository());


        // The default one will offer the Zip and POIFS detectors
        assertDetectors(normDetector, true, true);


        // The one from the config won't, as we excluded those
        assertDetectors(confDetector, false, false);
    }
Junit test class for {@link TikaConfig}, which cover things
that {@link TikaConfigTest} can't do due to a need for the
full set of detectors
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/config/TikaDetectorConfigTest.java