@Test
public void testWriteFeatureAsLineString() throws
                                           Exception {

    // given a Feature as LineString
    final Feature feature = mock(Feature.class);
    doReturn("id1").when(feature)
                   .getId();
    doReturn("Feature").when(feature)
                       .getType();
    doReturn(createLineString(gf,
                              createCoordinate(gf,
                                               47.2256258d,
                                               -1.5545135d),
                              createCoordinate(gf,
                                               47.225136d,
                                               -1.553913d))).when(feature)
                                                            .getGeometry();
    doReturn(new Bundle()).when(feature)
                          .getProperties();
    // when write this Feature as JSON string
    final StringWriter writer = new StringWriter();
    geoJsonWriter.write(writer,
                        feature);
    // then
    assertNotNull(writer.toString());
    assertEquals(TestHelper.getFixture("feature_linestring.json"),
                 writer.toString());
}