@Test
public void testMultipleGeometries() throws Exception {

    Map<String, Object> json = loadJSONResource("featureCollectionMultipleGeometries.json");
    CoordinateReferenceSystem crs84 = CRS.decode("EPSG:4326", true);
    SimpleFeatureType schema = GeoJSONSchemaDetector.getSchema(json, crs84);
    SimpleFeatureCollection fc = GeoJSONReader2.toFeatureCollection(json, schema);
    try (SimpleFeatureIterator it = fc.features()) {
        SimpleFeature f = it.hasNext() ? it.next() : null;
        assertFalse(it.hasNext());
        assertNotNull(f);
        assertEquals("feature.0", f.getID());
        WKTReader wkt = new WKTReader();
        assertEquals(wkt.read("LINESTRING (1.1 1.2, 1.3 1.4)"), f.getAttribute("otherGeometry"));
        assertEquals(wkt.read("POINT (0.1 0.1)"), f.getDefaultGeometry());
    }
}