@Test
public void testDetectNull() throws Exception {

    MediaType html = new MediaType("text", "html");
    Detector detector = new MagicDetector(html, "<html".getBytes(US_ASCII));
    assertEquals(
            MediaType.OCTET_STREAM,
            detector.detect(null, new Metadata()));
}