### Question:
SpotViewMetadataInspector implements MetadataInspector { @Override public MetadataInspector.Metadata getMetadata(Path productPath) throws IOException { try (VirtualDirEx productDirectory = VirtualDirEx.build(productPath, false, true)) { SpotViewMetadata productMetadata = SpotViewProductReader.readProductMetadata(productDirectory); SpotDimapMetadata imageMetadata = SpotViewProductReader.readImageMetadata(productDirectory); MetadataInspector.Metadata metadata = new MetadataInspector.Metadata(); metadata.setProductWidth(productMetadata.getRasterWidth()); metadata.setProductHeight(productMetadata.getRasterHeight()); GeoCoding geoCoding = SpotViewProductReader.buildTiePointGridGeoCoding(productMetadata, imageMetadata, null); if (geoCoding == null) { geoCoding = SpotViewProductReader.buildCrsGeoCoding(productMetadata.getRasterWidth(), productMetadata.getRasterHeight(), productMetadata, imageMetadata); } metadata.setGeoCoding(geoCoding); String[] bandNames = productMetadata.getBandNames(); for (int i = 0; i < bandNames.length; i++) { metadata.getBandList().add(bandNames[i]); } return metadata; } catch (RuntimeException | IOException exception) { throw exception; } catch (Exception exception) { throw new IOException(exception); } } SpotViewMetadataInspector(); @Override MetadataInspector.Metadata getMetadata(Path productPath);  }### Answer:
@Test public void testMetadataInspector() throws IOException { assumeTrue(TestUtil.testdataAvailable()); File productFile = TestUtil.getTestFile(PRODUCTS_FOLDER + "SP04_HRI1_X__1O_20050605T090007_20050605T090016_DLR_70_PREU.BIL.ZIP"); SpotViewMetadataInspector metadataInspector = new SpotViewMetadataInspector(); MetadataInspector.Metadata metadata = metadataInspector.getMetadata(productFile.toPath()); assertNotNull(metadata); assertEquals(2713, metadata.getProductWidth()); assertEquals(2568, metadata.getProductHeight()); GeoCoding geoCoding = metadata.getGeoCoding(); assertNotNull(geoCoding); CoordinateReferenceSystem coordinateReferenceSystem = geoCoding.getGeoCRS(); assertNotNull(coordinateReferenceSystem); assertNotNull(coordinateReferenceSystem.getName()); assertEquals("WGS84(DD)", coordinateReferenceSystem.getName().getCode()); assertNotNull(metadata.getBandList()); assertEquals(4, metadata.getBandList().size()); assertTrue(metadata.getBandList().contains("band_0")); assertTrue(metadata.getBandList().contains("band_1")); assertTrue(metadata.getBandList().contains("band_2")); assertTrue(metadata.getBandList().contains("band_3")); assertNotNull(metadata.getMaskList()); assertEquals(0, metadata.getMaskList().size()); }