### Question:
SpotDimapMetadataInspector implements MetadataInspector { @Override public MetadataInspector.Metadata getMetadata(Path productPath) throws IOException { try (VirtualDirEx productDirectory = VirtualDirEx.build(productPath, false, true)) { SpotSceneMetadata spotMetadata = SpotSceneMetadata.create(productDirectory, logger); MetadataInspector.Metadata metadata; if (SpotDimapProductReader.isSingleVolumeMetadata(spotMetadata.getVolumeMetadata())) { metadata = readSingleVolumeMetadata(productDirectory, spotMetadata.getComponentMetadata(0)); } else { metadata = readMultipleVolumeMetadata(productDirectory, spotMetadata, null); } metadata.getMaskList().add(SpotConstants.NODATA_VALUE); metadata.getMaskList().add(SpotConstants.SATURATED_VALUE); return metadata; } catch (RuntimeException | IOException exception) { throw exception; } catch (Exception exception) { throw new IOException(exception); } } SpotDimapMetadataInspector(); @Override MetadataInspector.Metadata getMetadata(Path productPath);  }### Answer:
@Test public void testMetadataInspector() throws IOException { assumeTrue(TestUtil.testdataAvailable()); File productFile = TestUtil.getTestFile(PRODUCTS_FOLDER + "30382639609301123571X0_1A_NETWORK.ZIP"); SpotDimapMetadataInspector metadataInspector = new SpotDimapMetadataInspector(); MetadataInspector.Metadata metadata = metadataInspector.getMetadata(productFile.toPath()); assertNotNull(metadata); assertEquals(3000, metadata.getProductWidth()); assertEquals(3000, metadata.getProductHeight()); GeoCoding geoCoding = metadata.getGeoCoding(); assertNotNull(geoCoding); assertNotNull(metadata.getBandList()); assertEquals(4, metadata.getBandList().size()); assertTrue(metadata.getBandList().contains("XS1")); assertTrue(metadata.getBandList().contains("XS2")); assertTrue(metadata.getBandList().contains("XS3")); assertTrue(metadata.getBandList().contains("SWIR")); assertNotNull(metadata.getMaskList()); assertEquals(2, metadata.getMaskList().size()); assertTrue(metadata.getMaskList().contains("NODATA")); assertTrue(metadata.getMaskList().contains("SATURATED")); }