@Test
public void testReadToValidGeometryRDD()
        throws IOException
{

    //ensure that flag does not affect valid geometries
    SpatialRDD geojsonRDD = GeoJsonReader.readToGeometryRDD(sc, geoJsonGeomWithFeatureProperty, true, false);
    assertEquals(geojsonRDD.rawSpatialRDD.count(), 1001);
    geojsonRDD = GeoJsonReader.readToGeometryRDD(sc, geoJsonGeomWithoutFeatureProperty, true, false);
    assertEquals(geojsonRDD.rawSpatialRDD.count(), 10);
    //2 valid and 1 invalid geometries
    geojsonRDD = GeoJsonReader.readToGeometryRDD(sc, geoJsonWithInvalidGeometries, false,false);
    assertEquals(geojsonRDD.rawSpatialRDD.count(), 2);
    geojsonRDD = GeoJsonReader.readToGeometryRDD(sc, geoJsonWithInvalidGeometries);
    assertEquals(geojsonRDD.rawSpatialRDD.count(), 3);
}