@Test
public void testWriteInvalidFeatureToJsonString() throws
                                                  Exception {

    // given a Feature as Point
    final Feature feature = mock(Feature.class);
    doReturn("id1").when(feature)
                   .getId();
    doReturn(mock(Geometry.class)).when(feature)
                                  .getGeometry();
    // when write this Feature as JSON string
    final String json = geoJsonWriter.write(feature);
    // then
    assertNull(json);
}