@Test
public void testCompileArcs() {

  WKTReader reader = new WKTReader();
  try {
    Geometry g1 = reader
        .read("LINESTRING ( 651124.9 6861379.5 1365, 651134 6861382.300000001 1364, 651156.2000000001 6861384.5 1363 )");
    Geometry g2 = reader
        .read("LINESTRING ( 651156.2000000001 6861384.5 1363, 651189.3 6861387.9 1361 )");
    List<ILineString> edges = new ArrayList<ILineString>();
    ILineString line1 = (ILineString) AdapterFactory.toGM_Object(g1);
    ILineString line2 = (ILineString) AdapterFactory.toGM_Object(g2);
    edges.add(line1);
    edges.add(line2);
    ILineString result = Operateurs.compileArcs(edges);
    System.out.println(result);
    edges.remove(line1);
    edges.add(line1);
    result = Operateurs.compileArcs(edges);
    Assert.assertNotNull(result);
    System.out.println(result);
  } catch (ParseException e) {
    e.printStackTrace();
  } catch (Exception e) {
    e.printStackTrace();
  }
}