### Question:
AlosPRIMetadataInspector implements MetadataInspector { @Override public Metadata getMetadata(Path productPath) throws IOException { try (VirtualDirEx productDirectory = VirtualDirEx.build(productPath, false, true)) { String metadataFileName = AlosPRIProductReader.buildMetadataFileName(productDirectory); Path imagesMetadataParentPath = AlosPRIProductReader.buildImagesMetadataParentPath(productDirectory, metadataFileName); AlosPRIMetadata alosPriMetadata = AlosPRIProductReader.readMetadata(productDirectory, metadataFileName, imagesMetadataParentPath); Metadata metadata = new Metadata(); metadata.setProductWidth(alosPriMetadata.getRasterWidth()); metadata.setProductHeight(alosPriMetadata.getRasterHeight()); Dimension defaultProductSize = new Dimension(metadata.getProductWidth(), metadata.getProductHeight()); GeoCoding productGeoCoding = AlosPRIProductReader.buildGeoCoding(alosPriMetadata, defaultProductSize, null, null); metadata.setGeoCoding(productGeoCoding); for (int bandIndex = 0; bandIndex < alosPriMetadata.getImageMetadataList().size(); bandIndex++) { ImageMetadata imageMetadata = alosPriMetadata.getImageMetadataList().get(bandIndex); metadata.getBandList().add(imageMetadata.getBandName()); } metadata.getMaskList().add(AlosPRIConstants.NODATA); metadata.getMaskList().add(AlosPRIConstants.SATURATED); return metadata; } catch (RuntimeException | IOException exception) { throw exception; } catch (Exception exception) { throw new IOException(exception); } } AlosPRIMetadataInspector(); @Override Metadata getMetadata(Path productPath);  }### Answer:
@Test public void testMetadataInspector() throws URISyntaxException, IOException { assumeTrue(TestUtil.testdataAvailable()); File productFile = TestUtil.getTestFile(PRODUCT_FOLDER + "AL1_NESR_PSM_OB1_1C_20061017T212724_20061017T212730_003892_0629_1855_0410.SIP" + File.separator + "AL1_NESR_PSM_OB1_1C_20061017T212724_20061017T212730_003892_0629_1855_0410.MD.XML"); AlosPRIMetadataInspector metadataInspector = new AlosPRIMetadataInspector(); MetadataInspector.Metadata metadata = metadataInspector.getMetadata(productFile.toPath()); assertNotNull(metadata); assertEquals(25629, metadata.getProductWidth()); assertEquals(22640, metadata.getProductHeight()); assertNotNull(metadata.getGeoCoding()); assertNotNull(metadata.getBandList()); assertEquals(3, metadata.getBandList().size()); assertTrue(metadata.getBandList().contains("ALPSMB038921910")); assertTrue(metadata.getBandList().contains("ALPSMF038921800")); assertTrue(metadata.getBandList().contains("ALPSMN038921855")); assertNotNull(metadata.getMaskList()); assertEquals(2, metadata.getMaskList().size()); assertTrue(metadata.getMaskList().contains("no data")); assertTrue(metadata.getMaskList().contains("saturated")); }