@Test
public void testOpenRingAtIndex() {

  IDirectPosition p1 = new DirectPosition(0.0, 0.0);
  IDirectPosition p2 = new DirectPosition(10.0, 0.0);
  IDirectPosition p3 = new DirectPosition(20.0, 0.0);
  IDirectPosition p4 = new DirectPosition(30.0, 5.0);
  IDirectPosition p5 = new DirectPosition(40.0, 10.0);
  IDirectPosition p6 = new DirectPosition(0.0, 10.0);
  IDirectPositionList list1 = new DirectPositionList();
  list1.add(p1);
  list1.add(p2);
  list1.add(p3);
  list1.add(p4);
  list1.add(p5);
  list1.add(p6);
  list1.add(p1);
  IRing line1 = new GM_Ring(new GM_LineString(list1));
  IDirectPositionList list2 = new DirectPositionList();
  list2.add(p3);
  list2.add(p4);
  list2.add(p5);
  list2.add(p6);
  list2.add(p1);
  list2.add(p2);
  ILineString line2 = new GM_LineString(list2);
  Assert.assertTrue(line2.equals(CommonAlgorithmsFromCartAGen
      .openRingAtIndex(line1, 2)));
}