### Question:
MaterializedIndexFeatureIterator implements AutoCloseableIterator<SimpleFeature> { public static MaterializedIndexFeatureIterator create(FeatureType outputSchema, AutoCloseableIterator<NodeRef> nodes, GeometryFactory geometryFactory, org.locationtech.geogig.crs.CoordinateReferenceSystem crs) { SimpleFeatureBuilder builder = new SimpleFeatureBuilder(GT.adapt(outputSchema)); return new MaterializedIndexFeatureIterator(builder, nodes, geometryFactory, GT.adapt(crs)); } private  MaterializedIndexFeatureIterator(final SimpleFeatureBuilder builder,
            AutoCloseableIterator<NodeRef> nodes, GeometryFactory geometryFactory,
            CoordinateReferenceSystem crs); static MaterializedIndexFeatureIterator create(FeatureType outputSchema,
            AutoCloseableIterator<NodeRef> nodes, GeometryFactory geometryFactory,
            org.locationtech.geogig.crs.CoordinateReferenceSystem crs); @Override void close(); @Override boolean hasNext(); @Override SimpleFeature next();  }### Answer:
@Test public void testIterate() throws Exception { CoordinateReferenceSystem crs = pointsType.getCoordinateReferenceSystem(); FeatureType subType = FeatureTypes.createSubType(pointsType, "pp", "ip"); NodeRef n1 = nodeRef(points1, "pp", "ip"); NodeRef n2 = nodeRef(points2, "pp", "ip"); NodeRef n3 = nodeRef(points3, "pp", "ip"); AutoCloseableIterator<NodeRef> nodes = AutoCloseableIterator .fromIterator(Lists.newArrayList(n1, n2, n3).iterator()); MaterializedIndexFeatureIterator iterator; iterator = MaterializedIndexFeatureIterator.create(subType, nodes, geometryFactory, crs); ArrayList<SimpleFeature> features = Lists.newArrayList(iterator); assertEquals(3, features.size()); assertFeature(subType, points1, features.get(0)); assertFeature(subType, points2, features.get(1)); assertFeature(subType, points3, features.get(2)); }