@Test
public void testParseGlobalMetadata() throws Exception {

    Parser parser = new NetCDFParser();
    ContentHandler handler = new BodyContentHandler();
    Metadata metadata = new Metadata();
    try (InputStream stream = NetCDFParser.class
            .getResourceAsStream("/test-documents/sresa1b_ncar_ccsm3_0_run1_200001.nc")) {
        parser.parse(stream, handler, metadata, new ParseContext());
    }
    assertEquals(metadata.get(TikaCoreProperties.TITLE),
            "model output prepared for IPCC AR4");
    assertEquals(metadata.get(Metadata.CONTACT), "ccsm@ucar.edu");
    assertEquals(metadata.get(Metadata.PROJECT_ID),
            "IPCC Fourth Assessment");
    assertEquals(metadata.get(Metadata.CONVENTIONS), "CF-1.0");
    assertEquals(metadata.get(Metadata.REALIZATION), "1");
    assertEquals(metadata.get(Metadata.EXPERIMENT_ID),
            "720 ppm stabilization experiment (SRESA1B)");
    assertEquals(metadata.get("File-Type-Description"), 
            "NetCDF-3/CDM");
    String content = handler.toString();
    assertContains("long_name = \"Surface area\"", content);
    assertContains("float area(lat=128, lon=256)", content);
    assertContains("float lat(lat=128)", content);
    assertContains("double lat_bnds(lat=128, bnds=2)", content);
    assertContains("double lon_bnds(lon=256, bnds=2)", content);
    
}