BinnedProductReader extends AbstractProductReader { static int getWavelengthFromBandName(String bandName) { final String[] bandNameParts = bandName.split("_"); for (String bandNamePart : bandNameParts) { if (StringUtils.isNumeric(bandNamePart, Integer.class)) { return Integer.parseInt(bandNamePart); } } return 0; } BinnedProductReader(BinnedProductReaderPlugin readerPlugIn); @Override void close();  }
@Test public void testGetWavelengthFromBandName() { assertEquals(670, BinnedProductReader.getWavelengthFromBandName("atot_670")); assertEquals(443, BinnedProductReader.getWavelengthFromBandName("aph_443")); assertEquals(0, BinnedProductReader.getWavelengthFromBandName("chlor_a")); assertEquals(0, BinnedProductReader.getWavelengthFromBandName("latitude")); }