@Test
public void testGeometryCollection() throws Exception {

    Map<String, Object> json = loadJSONResource("geometrycollection.json");
    GeometryCollection geom = (GeometryCollection) GeoJSONReader2.toGeometry(json);
    assertEquals(2, geom.getNumGeometries());
    Point p = (Point) geom.getGeometryN(0);
    Coordinate c = p.getCoordinate();
    assertEquals(100.0, c.x, 1e6);
    assertEquals(0.0, c.y, 1e6);
    LineString ls = (LineString) geom.getGeometryN(1);
    CoordinateSequence cs = ls.getCoordinateSequence();
    assertEquals(2, cs.size());
    c = cs.getCoordinate(0);
    assertEquals(101.0, c.x, 1e6);
    assertEquals(0.0, c.y, 1e6);
    c = cs.getCoordinate(1);
    assertEquals(102.0, c.x, 1e6);
    assertEquals(1.0, c.y, 1e6);
}