@Test
public void testInsertVertexInLinearRing() throws Exception {

    LinearRing linearRing = (LinearRing) wKTReader.read("LINEARRING(0 8, 1 8 , 3 8,  8  8, 10 8, 20 8, 0 8)");
    Point point = (Point) wKTReader.read("POINT(1.5 4 )");
    //Test a point in a segment
    LinearRing result = GeometryEdit.insertVertexInLinearRing(linearRing, point, 4);
    assertEquals(result, wKTReader.read("LINEARRING(0 8, 1 8 , 1.5 8, 3 8,  8  8, 10 8, 20 8, 0 8)"));
    //Test a point on an existing coordinate
    point = (Point) wKTReader.read("POINT(1 4 )");
    result = GeometryEdit.insertVertexInLinearRing(linearRing, point, 4);
    //Because the geometry is not modified
    assertNull(result);
}