BinnedProductReader extends AbstractProductReader { static ProductData.UTC extractStartTime(NetcdfFile netcdfFile) { return extractTime(netcdfFile, "time_coverage_start"); } BinnedProductReader(BinnedProductReaderPlugin readerPlugIn); @Override void close();  }
@Test public void testExtractStartTime() throws Exception { final URL resource = getClass().getResource("test.nc"); final NetcdfFile netcdfFile = NetcdfFile.openInMemory(resource.toURI()); ProductData.UTC startTime = BinnedProductReader.extractStartTime(netcdfFile); assertEquals(ProductData.UTC.parse("20030101:0000", "yyyyMMdd:HHmm").getAsDate().getTime(), startTime.getAsDate().getTime()); }
@Test public void testExtractStartTime_NoTimeInfo() throws Exception { final URL resource = getClass().getResource("test_without_time_info.nc"); final NetcdfFile netcdfFile = NetcdfFile.openInMemory(resource.toURI()); ProductData.UTC startTime = BinnedProductReader.extractStartTime(netcdfFile); assertNull(startTime); }