@Test
    public void testOoxmlDetection() throws Exception {
        // These two do luckily have [Content_Types].xml near the start,
        //  so our mime magic will spot them
        assertTypeByData("application/x-tika-ooxml", "testEXCEL.xlsx");
        assertTypeByData("application/x-tika-ooxml", "testPPT.pptx");

        // This one quite legitimately doesn't have its [Content_Types].xml
        //  file as one of the first couple of entries
        // As such, our mime magic can't figure it out...
        assertTypeByData("application/zip", "testWORD.docx");

        // POI-generated files have the rels first not Content Types
        assertTypeByData("application/x-tika-ooxml", "testEXCEL_poi.xlsx");

        // If we give the filename as well as the data, we can
        //  specialise the ooxml generic one to the correct type
        assertTypeByNameAndData("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                "testEXCEL.xlsx");
        assertTypeByNameAndData(
                "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                "testPPT.pptx");
        assertTypeByNameAndData(
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
                "testWORD.docx");

        assertTypeByNameAndData("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
                "testEXCEL_poi.xlsx");

        // Test a few of the less usual ones
        assertTypeByNameAndData("application/vnd.ms-excel.sheet.binary.macroenabled.12",
                "testEXCEL.xlsb");
        assertTypeByNameAndData("application/vnd.ms-powerpoint.presentation.macroenabled.12",
                "testPPT.pptm");
        assertTypeByNameAndData("application/vnd.ms-powerpoint.template.macroenabled.12",
                "testPPT.potm");
        assertTypeByNameAndData("application/vnd.ms-powerpoint.slideshow.macroenabled.12",
                "testPPT.ppsm");
    }
Note - detecting container formats by mime magic is very very
iffy, as we can't be sure where things will end up.
People really ought to use the container aware detection...
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/TestMimeTypes.java