### Question:
RapidEyeL3MetadataInspector implements MetadataInspector { @Override public Metadata getMetadata(Path productPath) throws IOException { try (VirtualDirEx productDirectory = VirtualDirEx.build(productPath, false, true)) { MetadataList<RapidEyeMetadata> metadataList = RapidEyeL3Reader.readMetadata(productDirectory); RastersMetadata rastersMetadata = RapidEyeL3Reader.computeMaximumDefaultProductSize(metadataList, productDirectory); Metadata metadata = new Metadata(rastersMetadata.getMaximumWidh(), rastersMetadata.getMaximumHeight()); for (int i = 0; i < metadataList.getCount(); i++) { String[] bandNames = RapidEyeConstants.BAND_NAMES; String bandPrefix = RapidEyeL3Reader.computeBandPrefix(metadataList.getCount(), i); for (int k = 0; k < bandNames.length; k++) { String bandName = bandPrefix + bandNames[k]; metadata.addBandName(bandName); } } GeoCoding geoCoding = addGeoCoding(metadataList, productDirectory); metadata.setGeoCoding(geoCoding); return metadata; } catch (RuntimeException | IOException exception) { throw exception; } catch (Exception exception) { throw new IOException(exception); } } RapidEyeL3MetadataInspector(); @Override Metadata getMetadata(Path productPath);  }### Answer:
@Test public void testMetadataInspector() throws IOException { assumeTrue(TestUtil.testdataAvailable()); File productFile = TestUtil.getTestFile(PRODUCTS_FOLDER + "Eritrea/13N041E-R1C2_2012_RE1_3a-3M_1234567890_metadata.xml"); RapidEyeL3MetadataInspector metadataInspector = new RapidEyeL3MetadataInspector(); MetadataInspector.Metadata metadata = metadataInspector.getMetadata(productFile.toPath()); assertNotNull(metadata); assertEquals(10985, metadata.getProductWidth()); assertEquals(11232, metadata.getProductHeight()); assertNotNull(metadata.getGeoCoding()); assertNotNull(metadata.getBandList()); assertEquals(5, metadata.getBandList().size()); assertTrue(metadata.getBandList().contains("red")); assertTrue(metadata.getBandList().contains("green")); assertTrue(metadata.getBandList().contains("near_infrared")); assertTrue(metadata.getBandList().contains("blue")); assertTrue(metadata.getBandList().contains("red_edge")); assertNotNull(metadata.getMaskList()); assertEquals(0, metadata.getMaskList().size()); }