@Test
    public void testDITADetection() throws Exception {
        assertTypeByName("application/dita+xml; format=topic", "test.dita");
        assertTypeByName("application/dita+xml; format=map", "test.ditamap");
        assertTypeByName("application/dita+xml; format=val", "test.ditaval");

        assertTypeByData("application/dita+xml; format=task", "testDITA.dita");
        assertTypeByData("application/dita+xml; format=concept", "testDITA2.dita");
        assertTypeByData("application/dita+xml; format=map", "testDITA.ditamap");

        assertTypeByNameAndData("application/dita+xml; format=task", "testDITA.dita");
        assertTypeByNameAndData("application/dita+xml; format=concept", "testDITA2.dita");
        assertTypeByNameAndData("application/dita+xml; format=map", "testDITA.ditamap");

        // These are all children of the official type
        assertEquals("application/dita+xml",
                repo.getMediaTypeRegistry().getSupertype(getTypeByNameAndData("testDITA.ditamap"))
                        .toString());
        assertEquals("application/dita+xml",
                repo.getMediaTypeRegistry().getSupertype(getTypeByNameAndData("testDITA.dita"))
                        .toString());
        // Concept inherits from topic
        assertEquals("application/dita+xml; format=topic",
                repo.getMediaTypeRegistry().getSupertype(getTypeByNameAndData("testDITA2.dita"))
                        .toString());
    }
All 3 DITA types are in theory handled by the same mimetype,
but we specialise them
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/TestMimeTypes.java