WorldFireReader extends AbstractProductReader { @Override public TreeNode<File> getProductComponents() { final File inputFile = new File(getInput().toString()); final File parent = inputFile.getParentFile(); final TreeNode<File> result = new TreeNode<File>(parent.getName()); result.setContent(parent); final TreeNode<File> productFile = new TreeNode<File>(inputFile.getName()); productFile.setContent(inputFile); result.addChild(productFile); return result; } protected  WorldFireReader(WorldFireReaderPlugIn readerPlugIn); @Override WorldFireReaderPlugIn getReaderPlugIn(); @Override TreeNode<File> getProductComponents();  }
@Test public void testReader() throws IOException { final File file = TestResourceHelper.getAatsrAlgo1AsFile(); reader.readProductNodes(file, null); assertNotNull(reader.getInput()); assertNull(reader.getSubsetDef()); assertSame(file, reader.getInput()); final TreeNode<File> productComponents = reader.getProductComponents(); assertNotNull(productComponents); assertEquals(1, productComponents.getChildren().length); }