@Test
public void testWriteFeatureToJsonString() throws
                                           Exception {

    // given a Feature as Point
    final Feature feature = mock(Feature.class);
    doReturn("id1").when(feature)
                   .getId();
    doReturn("Feature").when(feature)
                       .getType();
    doReturn(createPoint(gf,
                         47.2256258d,
                         -1.5545135d)).when(feature)
                                      .getGeometry();
    doReturn(new Bundle()).when(feature)
                          .getProperties();
    // when write this Feature as JSON string
    final String json = geoJsonWriter.write(feature);
    // then
    assertNotNull(json);
    assertEquals(TestHelper.getFixture("feature_point.json"),
                 json);
}