### Question:
Spot6ProductReader extends AbstractProductReader { @Override public TreeNode<File> getProductComponents() { if (productDirectory.isCompressed()) { return super.getProductComponents(); } else { TreeNode<File> result = super.getProductComponents(); try { File volumeMetadataPhysicalFile = this.productDirectory.getFile(Spot6Constants.ROOT_METADATA); if (this.metadata != null) { addProductComponentIfNotPresent(Spot6Constants.ROOT_METADATA, volumeMetadataPhysicalFile, result); for (VolumeMetadata component : this.metadata.getVolumeMetadataList()) { try { File fullPathComp = this.productDirectory.getFile(component.getPath().toString()); addProductComponentIfNotPresent(component.getFileName(), fullPathComp, result); for (VolumeComponent vComponent: component.getComponents()){ if(vComponent.getType().equals(Spot6Constants.METADATA_FORMAT)){ File fullPathVComp = this.productDirectory.getFile(fullPathComp.getParent() + File.separator + vComponent.getRelativePath()); addProductComponentIfNotPresent(Paths.get(vComponent.getRelativePath()).getFileName().toString(), fullPathVComp, result); if(vComponent.getComponentMetadata() != null && vComponent.getComponentMetadata() instanceof ImageMetadata){ ImageMetadata image = (ImageMetadata)vComponent.getComponentMetadata(); for (String raster : image.getRasterFileNames()){ addProductComponentIfNotPresent(raster, this.productDirectory.getFile(fullPathVComp.getParent() + File.separator + raster), result); } for (ImageMetadata.MaskInfo mask : image.getMasks()){ addProductComponentIfNotPresent(mask.name, mask.path.toFile(), result); } } } } } catch (IOException ex) { logger.warning(ex.getMessage()); } } } } catch (IOException ex) { logger.warning(ex.getMessage()); } return result; } } protected  Spot6ProductReader(Spot6ProductReaderPlugin readerPlugIn); @Override TreeNode<File> getProductComponents(); @Override void close();  }### Answer:
@Test public void testGetProductComponentsOnFileInput() throws IOException { assumeTrue(TestUtil.testdataAvailable()); File file = TestUtil.getTestFile(PRODUCTS_FOLDER + "SPOT6_1.5m_short" + File.separator + "SPOT_LIST.XML"); Spot6ProductReader reader = buildProductReader(); Product finalProduct = reader.readProductNodes(file, null); assertNotNull(finalProduct); TreeNode<File> components = reader.getProductComponents(); assertEquals(8, components.getChildren().length); assertEquals("SPOT_LIST.XML", components.getChildren()[0].getId()); assertEquals("SPOT_VOL.XML", components.getChildren()[1].getId()); assertEquals("DIM_SPOT6_PMS_201305251604372_ORT_816009101.XML", components.getChildren()[2].getId()); assertEquals("IMG_SPOT6_PMS_201305251604372_ORT_816009101_R2C2.JP2", components.getChildren()[3].getId()); assertEquals("Area_Of_Interest Mask", components.getChildren()[4].getId()); assertEquals("Detector_Quality Mask", components.getChildren()[5].getId()); assertEquals("Cloud_Cotation Mask", components.getChildren()[6].getId()); assertEquals("SPOT_PROD.XML", components.getChildren()[7].getId()); }