@Test
    public void testVisioDetection() throws Exception {
        // By Name, should get it right
        assertTypeByName("application/vnd.visio", "testVISIO.vsd");
        assertTypeByName("application/vnd.ms-visio.drawing.macroenabled.12", "testVISIO.vsdm");
        assertTypeByName("application/vnd.ms-visio.drawing", "testVISIO.vsdx");
        assertTypeByName("application/vnd.ms-visio.stencil.macroenabled.12", "testVISIO.vssm");
        assertTypeByName("application/vnd.ms-visio.stencil", "testVISIO.vssx");
        assertTypeByName("application/vnd.ms-visio.template.macroenabled.12", "testVISIO.vstm");
        assertTypeByName("application/vnd.ms-visio.template", "testVISIO.vstx");

        // By Name and Data, should get it right
        assertTypeByNameAndData("application/vnd.visio", "testVISIO.vsd");
        assertTypeByNameAndData("application/vnd.ms-visio.drawing.macroenabled.12",
                "testVISIO.vsdm");
        assertTypeByNameAndData("application/vnd.ms-visio.drawing", "testVISIO.vsdx");
        assertTypeByNameAndData("application/vnd.ms-visio.stencil.macroenabled.12",
                "testVISIO.vssm");
        assertTypeByNameAndData("application/vnd.ms-visio.stencil", "testVISIO.vssx");
        assertTypeByNameAndData("application/vnd.ms-visio.template.macroenabled.12",
                "testVISIO.vstm");
        assertTypeByNameAndData("application/vnd.ms-visio.template", "testVISIO.vstx");

        // By Data only, will get the container parent
        assertTypeByData("application/x-tika-msoffice", "testVISIO.vsd");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vsdm");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vsdx");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vssm");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vssx");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vstm");
        assertTypeByData("application/x-tika-ooxml", "testVISIO.vstx");
    }
Note - container based formats, needs container detection
to be properly correct
tika-parsers/tika-parsers-standard/tika-parsers-standard-package/src/test/java/org/apache/tika/mime/TestMimeTypes.java