@Test
    public void testDetection() throws Exception {
        String octetStream_str = MediaType.OCTET_STREAM.toString();
        String grb_str = "application/x-grib";

        testFile(grb_str, "gdas1.forecmwf.2014062612.grib2");
        testFile(grb_str, "GLDAS_CLM10SUBP_3H.A19790202.0000.001.grb");

        testFile(octetStream_str, "circles.svg");
        testFile(octetStream_str, "circles-with-prefix.svg");
        testFile(octetStream_str, "datamatrix.png");
        testFile(octetStream_str, "test.html");
        testFile(octetStream_str, "test-iso-8859-1.xml");
        testFile(octetStream_str, "test-utf8.xml");
        testFile(octetStream_str, "test-utf8-bom.xml");
        testFile(octetStream_str, "test-utf16le.xml");
        testFile(octetStream_str, "test-utf16be.xml");
        testFile(octetStream_str, "test-long-comment.xml");
        testFile(octetStream_str, "stylesheet.xsl");
        testUrl(octetStream_str, "http://www.ai.sri.com/daml/services/owl-s/1.2/Process.owl",
                "test-difficult-rdf1.xml");
        testUrl(octetStream_str, "http://www.w3.org/2002/07/owl#", "test-difficult-rdf2.xml");
        // add evil test from TIKA-327
        testFile(octetStream_str, "test-tika-327.html");
        // add another evil html test from TIKA-357
        testFile(octetStream_str, "testlargerbuffer.html");
        // test fragment of HTML with <div> (TIKA-1102)
        testFile(octetStream_str, "htmlfragment");
        // test binary CGM detection (TIKA-1170)
        testFile(octetStream_str, "plotutils-bin-cgm-v3.cgm");
        // test HTML detection of malformed file, previously identified as
        // image/cgm (TIKA-1170)
        testFile(octetStream_str, "test-malformed-header.html.bin");

        // test GCMD Directory Interchange Format (.dif) TIKA-1561
        testFile(octetStream_str, "brwNIMS_2014.dif");
    }
The test case only works on the detector that only has grb model as
currently the grb model is used as an example; if more models are added
in the TrainedModelDetector, the following tests will need to modified to reflect
the corresponding type instead of test-equal with the "OCTET_STREAM";

@throws Exception
tika-core/src/test/java/org/apache/tika/detect/MimeDetectionWithNNTest.java