WKTReader { @NonNull public FeatureCollection readFeatureCollection(@NonNull final Reader in) throws IOException { final FeatureCollection featureCollection = new FeatureCollection(); featureCollection.addAllFeatures(readFeatures(in)); return featureCollection; } WKTReader(); void readFeatures(@NonNull final Reader in,
                             @NonNull final OnWKTReaderListener listener); @NonNull List<Feature> readFeatures(@NonNull final Reader in); @NonNull FeatureCollection readFeatureCollection(@NonNull final Reader in);  }
@Test public void testReadFeatureCollection() throws Exception { final String wkt = getFixture("features.wkt"); final FeatureCollection featureCollection = new WKTReader().readFeatureCollection(new StringReader(wkt)); assertNotNull(featureCollection); assertEquals(3, featureCollection.getFeatures() .size()); assertNotNull(featureCollection.getFeature("69")); assertNotNull(featureCollection.getFeature("19")); assertNotNull(featureCollection.getFeature("146")); }