@Test
public void testSplitLine() {

  IDirectPosition p1 = new DirectPosition(0.0, 0.0);
  IDirectPosition p2 = new DirectPosition(10.0, 10.0);
  IDirectPosition p3 = new DirectPosition(20.0, 20.0);
  IDirectPosition p4 = new DirectPosition(30.0, 30.0);
  IDirectPosition p5 = new DirectPosition(40.0, 50.0);
  IDirectPosition p6 = new DirectPosition(50.0, 55.0);
  IDirectPosition p7 = new DirectPosition(15.0, 15.0);
  ILineString line = new GM_LineString(p1, p2, p3, p4, p5, p6);
  IDirectPositionList list1 = new DirectPositionList();
  list1.add(p1);
  list1.add(p2);
  list1.add(p3);
  ILineString line1 = new GM_LineString(list1);
  IDirectPositionList list2 = new DirectPositionList();
  list2.add(p3);
  list2.add(p4);
  list2.add(p5);
  list2.add(p6);
  ILineString line2 = new GM_LineString(list2);
  IDirectPositionList list3 = new DirectPositionList();
  list3.add(p1);
  list3.add(p2);
  list3.add(p7);
  ILineString line3 = new GM_LineString(list3);
  IDirectPositionList list4 = new DirectPositionList();
  list4.add(p7);
  list4.add(p3);
  list4.add(p4);
  list4.add(p5);
  list4.add(p6);
  ILineString line4 = new GM_LineString(list4);
  GeometryEngine.init();
  ILineString[] lines = CommonAlgorithmsFromCartAGen.splitLine(line, p3,
      0.001);
  ILineString[] lines2 = CommonAlgorithmsFromCartAGen.splitLine(line, p7,
      0.001);
  Assert.assertTrue(line3.equals(lines2[0]));
  Assert.assertTrue(line4.equals(lines2[1]));
  Assert.assertTrue(line1.equals(lines[0]));
  Assert.assertTrue(line2.equals(lines[1]));
}