@Test
    public void testDetectOOXML() throws Exception {
        assertTypeByData("testEXCEL.xlsx",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        assertTypeByData("testWORD.docx",
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
        assertTypeByData("testPPT.pptx",
                "application/vnd.openxmlformats-officedocument.presentationml.presentation");

        // Check some of the less common OOXML types
        assertTypeByData("testPPT.pptm",
                "application/vnd.ms-powerpoint.presentation.macroenabled.12");
        assertTypeByData("testPPT.ppsx",
                "application/vnd.openxmlformats-officedocument.presentationml.slideshow");
        assertTypeByData("testPPT.ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12");
        assertTypeByData("testDOTM.dotm", "application/vnd.ms-word.template.macroEnabled.12");
        assertTypeByData("testEXCEL.strict.xlsx",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        assertTypeByData("testEXCEL_macro_enabled_template.xltm",
                "application/vnd.ms-excel.template.macroenabled.12");
        assertTypeByData("testEXCEL_template.xltx",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.template");

        assertTypeByData("testPPT.xps", "application/vnd.ms-xpsdocument");

        assertTypeByData("testVISIO.vsdm", "application/vnd.ms-visio.drawing.macroenabled.12");
        assertTypeByData("testVISIO.vsdx", "application/vnd.ms-visio.drawing");
        assertTypeByData("testVISIO.vssm", "application/vnd.ms-visio.stencil.macroenabled.12");
        assertTypeByData("testVISIO.vssx", "application/vnd.ms-visio.stencil");
        assertTypeByData("testVISIO.vstm", "application/vnd.ms-visio.template.macroenabled.12");
        assertTypeByData("testVISIO.vstx", "application/vnd.ms-visio.template");

        // .xlsb is an OOXML file containing the binary parts, and not
        //  an OLE2 file as you might initially expect!
        assertTypeByData("testEXCEL.xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12");

        // With the filename and data
        assertTypeByNameAndData("testEXCEL.xlsx",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        assertTypeByNameAndData("testWORD.docx",
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
        assertTypeByNameAndData("testPPT.pptx",
                "application/vnd.openxmlformats-officedocument.presentationml.presentation");

        // With the wrong filename supplied, data will trump filename
        assertTypeByNameAndData("testEXCEL.xlsx", "notWord.docx",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
        assertTypeByNameAndData("testWORD.docx", "notExcel.xlsx",
                "application/vnd.openxmlformats-officedocument.wordprocessingml.document");
        assertTypeByNameAndData("testPPT.pptx", "notWord.docx",
                "application/vnd.openxmlformats-officedocument.presentationml.presentation");

        // With an incorrect filename of a different container type, data trumps filename
        assertTypeByNameAndData("testEXCEL.xlsx", "notOldExcel.xls",
                "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
    }
EPub uses a similar mimetype entry to OpenDocument for storing
the mimetype within the parent zip file
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/detect/TestContainerAwareDetector.java