@Test
public void testProject() {

  IDirectPosition p1 = new DirectPosition(0.0, 0.0);
  IDirectPosition p2 = new DirectPosition(10.0, 10.0);
  IDirectPosition p3 = new DirectPosition(0.0, 5.0);
  IDirectPosition p4 = new DirectPosition(5.0, 0.0);
  Vector2D vect = new Vector2D(p1, p2);
  Vector2D vect2 = new Vector2D(p1, p3);
  Vector2D vect3 = new Vector2D(p1, p4);
  Vector2D proj = vect.project(0.0);
  Assert.assertTrue(Math.abs(10 - proj.norme()) < 0.001);
  Assert.assertTrue(proj.isColinear(vect3));
  Vector2D proj2 = vect.project(Math.PI * 2);
  Assert.assertTrue(Math.abs(10 - proj2.norme()) < 0.001);
  Assert.assertTrue(proj2.isColinear(vect3));
  Vector2D proj3 = vect.project(Math.PI / 2);
  Assert.assertTrue(Math.abs(10 - proj3.norme()) < 0.001);
  Assert.assertTrue(proj3.isColinear(vect2, 0.0001));
}