FeatureCollection implements GeoJson { public static FeatureCollection fromFeatures(@NonNull Feature[] features) { return new FeatureCollection(TYPE, null, Arrays.asList(features)); } FeatureCollection(String type, @Nullable BoundingBox bbox, @Nullable List<Feature> features); static FeatureCollection fromJson(@NonNull String json); static FeatureCollection fromFeatures(@NonNull Feature[] features); static FeatureCollection fromFeatures(@NonNull List<Feature> features); static FeatureCollection fromFeatures(@NonNull Feature[] features,
                                               @Nullable BoundingBox bbox); static FeatureCollection fromFeatures(@NonNull List<Feature> features,
                                               @Nullable BoundingBox bbox); static FeatureCollection fromFeature(@NonNull Feature feature); static FeatureCollection fromFeature(@NonNull Feature feature,
                                              @Nullable BoundingBox bbox); @NonNull @Override String type(); @Nullable @Override BoundingBox bbox(); @Nullable List<Feature> features(); @Override String toJson(); static TypeAdapter<FeatureCollection> typeAdapter(Gson gson); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void sanity() throws Exception { List<Feature> features = new ArrayList<>(); features.add(Feature.fromGeometry(null)); features.add(Feature.fromGeometry(null)); FeatureCollection featureCollection = FeatureCollection.fromFeatures(features); assertNotNull(featureCollection); }