@Test
    public void testPdfDetection() throws Exception {
        // PDF extension by name is enough
        assertTypeByName("application/pdf", "x.pdf");
        assertTypeByName("application/pdf", "x.PDF");

        // For normal PDFs, can get by name or data or both
        assertType("application/pdf", "testPDF.pdf");
        assertTypeByData("application/pdf", "testPDF.pdf");

        // PDF with a BoM works both ways too
        assertType("application/pdf", "testPDF_bom.pdf");
        assertTypeByData("application/pdf", "testPDF_bom.pdf");
    }
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