@Test
public void testSegmentInThreeFeature() throws Exception {

    SimpleFeatureSource source = featureSource.getFeatureSource("lrssimple");
    LRSSegmentProcess process = new LRSSegmentProcess();
    SimpleFeatureCollection origional = source.getFeatures();
    FeatureCollection result = process.execute(origional, "from_lrs", "to_lrs", 0.5, 5.5);
    Assert.assertEquals(1, result.size());
    Feature feature = result.features().next();
    MultiLineString segment = (MultiLineString) feature.getDefaultGeometryProperty().getValue();
    Assert.assertEquals(4, segment.getNumPoints());
    Assert.assertEquals(0.5, segment.getCoordinates()[0].x, 0.0);
    Assert.assertEquals(0.0, segment.getCoordinates()[0].y, 0.0);
    Assert.assertEquals(5.5, segment.getCoordinates()[3].x, 0.0);
    Assert.assertEquals(0.0, segment.getCoordinates()[3].y, 0.0);
}