@Test
    public void testDetectNull() throws Exception {
        assertEquals(MediaType.OCTET_STREAM, detector.detect(null, new Metadata()));
    }
Test cases for the {@link TextDetector} class.
tika-core/src/test/java/org/apache/tika/detect/TextDetectorTest.java