@Test
public void testReadFeatureCollection() throws
                                        Exception {

    // given a JSON FeatureCollection
    final StringReader reader = new StringReader(TestHelper.getFixture("featurecollection.json"));
    // when read the JSON as FeatureCollection
    final FeatureCollection featureCollection = geoJsonReader.readFeatureCollection(reader);
    // then
    assertNotNull(featureCollection);
    assertEquals("FeatureCollection",
                 featureCollection.getType());
    assertFalse(featureCollection.isEmpty());
    assertTrue(featureCollection.hasFeature("id1"));
    assertTrue(featureCollection.hasFeature("id2"));
    assertTrue(featureCollection.hasFeature("id3"));
    assertTrue(featureCollection.hasFeature("id4"));
    assertTrue(featureCollection.hasFeature("id5"));
    assertFalse(featureCollection.hasFeature("no_such_feature"));
    final Feature feature1 = featureCollection.getFeature("id1");
    assertNotNull(feature1);
    assertEquals("id1",
                 feature1.getId());
    assertEquals("Feature",
                 feature1.getType());
    assertNotNull(feature1.getGeometry());
    assertEquals(createPoint(gf,
                             47.2256258d,
                             -1.5545135d),
                 feature1.getGeometry());
    final Feature feature2 = featureCollection.getFeature("id2");
    assertNotNull(feature2);
    assertEquals("id2",
                 feature2.getId());
    assertEquals("Feature",
                 feature2.getType());
    assertNotNull(feature2.getGeometry());
    assertEquals(createMultiPoint(gf,
                                  createPoint(gf,
                                              47.2256258d,
                                              -1.5545135d),
                                  createPoint(gf,
                                              47.225136d,
                                              -1.553913d)),
                 feature2.getGeometry());
    final Feature feature3 = featureCollection.getFeature("id3");
    assertNotNull(feature3);
    assertEquals("id3",
                 feature3.getId());
    assertEquals("Feature",
                 feature3.getType());
    assertNotNull(feature3.getGeometry());
    assertEquals(createLineString(gf,
                                  createCoordinate(gf,
                                                   47.2256258d,
                                                   -1.5545135d),
                                  createCoordinate(gf,
                                                   47.225136d,
                                                   -1.553913d)),
                 feature3.getGeometry());
    final Feature feature4 = featureCollection.getFeature("id4");
    assertNotNull(feature4);
    assertEquals("id4",
                 feature4.getId());
    assertEquals("Feature",
                 feature4.getType());
    assertNotNull(feature4.getGeometry());
    assertEquals(createMultiLineString(gf,
                                       createLineString(gf,
                                                        createCoordinate(gf,
                                                                         47.2256258d,
                                                                         -1.5545135d),
                                                        createCoordinate(gf,
                                                                         47.225136d,
                                                                         -1.553913d))),
                 feature4.getGeometry());
    final Feature feature5 = featureCollection.getFeature("id5");
    assertNotNull(feature5);
    assertEquals("id5",
                 feature5.getId());
    assertEquals("Feature",
                 feature5.getType());
    assertNotNull(feature5.getGeometry());
    assertEquals(createPolygon(gf,
                               createCoordinate(gf,
                                                47.226219d,
                                                -1.554430d),
                               createCoordinate(gf,
                                                47.226237d,
                                                -1.554261d),
                               createCoordinate(gf,
                                                47.226122d,
                                                -1.554245d),
                               createCoordinate(gf,
                                                47.226106d,
                                                -1.554411d),
                               createCoordinate(gf,
                                                47.226219d,
                                                -1.554430d)),
                 feature5.getGeometry());
}