@Test
public void testToSegmentsMultiLineString() throws Exception {

        //Test linestring
        Geometry geom = wKTReader.read("LINESTRING(0 8, 1 8 , 3 8,  8  8, 10 8, 20 8)");
        MultiLineString result = GeometryConvert.toSegmentsMultiLineString(geom);
        assertEquals(result.getNumGeometries(), 5);
        //Test linearring
        geom = wKTReader.read("LINEARRING(0 8, 1 8 , 3 8,  8  8, 10 8, 20 8, 0 8)");
        result = GeometryConvert.toSegmentsMultiLineString(geom);
        assertEquals(result.getNumGeometries(), 6);
        //Test duplicate coordinates
        geom = wKTReader.read("LINEARRING(0 8, 1 8 ,1 8, 3 8,  8  8, 10 8, 10 8, 20 8, 0 8)");
        result = GeometryConvert.toSegmentsMultiLineString(geom);
        assertEquals(result.getNumGeometries(), 6);
        //Test point
        geom = wKTReader.read("POINT(0 8)");
        result = GeometryConvert.toSegmentsMultiLineString(geom);
        assertNull(result);
        //Test multipoint
        geom = wKTReader.read("MULTIPOINT((0 8), (1 8))");
        result = GeometryConvert.toSegmentsMultiLineString(geom);
        assertNull(result);
}