@Test
public void testWriteEmptyFeatureCollection() throws
                                              Exception {

    // given an empty FeatureCollection
    final FeatureCollection featureCollection = mock(FeatureCollection.class);
    doReturn("FeatureCollection").when(featureCollection)
                                 .getType();
    // when write this FeatureCollection as JSON string
    final StringWriter writer = new StringWriter();
    geoJsonWriter.write(writer,
                        featureCollection);
    // then
    assertNotNull(writer.toString());
    assertEquals(TestHelper.getFixture("featurecollection_empty.json"),
                 writer.toString());
}