@Test
public void testProjectionOrtho() {

  IDirectPosition point = new DirectPosition(1.0, 1.0);
  Vector2D direction = new Vector2D(0.0, 1.0);
  IDirectPositionList list = new DirectPositionList();
  IDirectPositionList list2 = new DirectPositionList();
  IDirectPosition p1 = new DirectPosition(2.0, 0.0);
  IDirectPosition p2 = new DirectPosition(2.0, 1.0);
  IDirectPosition p3 = new DirectPosition(2.0, 4.0);
  list.add(p1);
  list.add(p2);
  list.add(p3);
  list2.add(p1);
  list2.add(p3);
  ILineString line = new GM_LineString(list);
  ILineString line2 = new GM_LineString(list2);
  IDirectPosition proj = CommonAlgorithmsFromCartAGen.projectionOrtho(point,
      line, direction);
  Assert.assertTrue(proj.equals(new DirectPosition(2.0, 1.0)));
  Assert.assertTrue(CommonAlgorithmsFromCartAGen.projectionOrtho(point,
      line2, direction).equals(new DirectPosition(2.0, 1.0)));
}