Scenario:
SpatialReference sr = SpatialReference.create(4326);
OGCPoint point = new OGCPoint(new Point(1.0, 1.0), sr);
OGCConcreteGeometryCollection collection = new OGCConcreteGeometryCollection(point, sr);
System.out.println(collection.asGeoJson());
Stack trace:
java.lang.NullPointerException
at com.esri.core.geometry.SimpleGeometryCursor.next(SimpleGeometryCursor.java:68)
at com.esri.core.geometry.OperatorExportToGeoJsonCursor.next(OperatorExportToGeoJsonCursor.java:72)
at com.esri.core.geometry.OperatorExportToGeoJsonLocal.execute(OperatorExportToGeoJsonLocal.java:49)
at com.esri.core.geometry.ogc.OGCGeometry.asGeoJson(OGCGeometry.java:96)