@Test
    public void testParseGlobalMetadata() throws Exception {
        if (System.getProperty("java.version").startsWith("1.5")) {
            return;
        }
        Parser parser = new HDFParser();
        ContentHandler handler = new BodyContentHandler();
        Metadata metadata = new Metadata();

        /*
         * this is a publicly available HDF5 file from the MLS mission:
         *
         *
         * ftp://acdisc.gsfc.nasa.gov/data/s4pa///Aura_MLS_Level2/ML2O3.002//2009
         * /MLS-Aura_L2GP-O3_v02-23-c01_2009d122.he5
         */
        try (InputStream stream = HDFParser.class.getResourceAsStream("/test-documents/test.he5")) {
            parser.parse(stream, handler, metadata, new ParseContext());
        }

        assertNotNull(metadata);
        assertEquals("5", metadata.get("GranuleMonth"));
    }
Test suite for the {@link HDFParser}.
tika-parsers/tika-parsers-extended/tika-parser-scientific-module/src/test/java/org/apache/tika/parser/hdf/HDFParserTest.java