### Question:
FileSystemNode extends AbstractNode { @Override public AbstractNode getSubNode(final int index) throws StoreException { if (nodes == null) { try { nodes = new FileSystemNode[numSubNodes]; for(int i = 0;i<nodes.length; i++){ final int offset; if(i>0){ final FileSystemNode previousNode = (FileSystemNode) nodes[i-1]; offset = previousNode.getSubNodeStartByte()+ previousNode.getSubNodesLength(); }else{ offset = subNodeStartByte; } buffer.goTo(offset); nodes[i] = readNode(buffer); } } catch (IOException e) { throw new StoreException(e); } } return nodes[index]; } FileSystemNode(final double minx, final double miny, final double maxx, final double maxy,
            final ScrollingBuffer buffer, final int startByte, final int subNodesLength); @Override int getNumSubNodes(); void setNumSubNodes(final int numSubNodes); int getSubNodeStartByte(); int getSubNodesLength(); @Override AbstractNode getSubNode(final int index); @Override void setSubNodes(final AbstractNode ... nodes);  }### Answer:
@Test public void testNoerror() throws Exception { final File file = new File("src/test/resources/org/geotoolkit/index/sample.qix"); final FileSystemIndexStore store = new FileSystemIndexStore(file); final DataReader reader = new DataReader() { @Override public Data read(final int id) throws IOException { return new DefaultData(DATA_DEFINITION){ @Override public String toString() { return Integer.toString(id); } }; } @Override public void close() throws IOException { } @Override public void read(int[] ids, Data[] buffer, int size) throws IOException { for(int i=0;i<size;i++){ buffer[i] = read(ids[i]); } } }; final QuadTree tree = store.load(); assertEquals(10,tree.getMaxDepth()); assertEquals(new Envelope(-8.86966023318779,3.188061808903407,36.113981340792286,43.55971524165336), tree.getRoot().getBounds(new Envelope())); assertEquals(3602,tree.getNumShapes()); final AbstractNode root = tree.getRoot(); for(int i=0;i<4;i++){ root.getSubNode(i); } CloseableCollection col = tree.search(reader,new Envelope(-8,3,37,40)); Iterator ite = col.iterator(); while(ite.hasNext()){ ite.next(); } }