@Test // TIKA-2232
public void testJBIG2() throws Exception {

    Metadata metadata = new Metadata();
    metadata.set(Metadata.CONTENT_TYPE, "image/x-jbig2");
    try (InputStream stream = getClass().getResourceAsStream("/test-documents/testJBIG2.jb2")) {
        parser.parse(stream, new DefaultHandler(), metadata, new ParseContext());
    }
    assertEquals("78", metadata.get("height"));
    assertEquals("328", metadata.get("width"));
    assertEquals("image/x-jbig2", metadata.get("Content-Type"));
}