@Test
public void testIntersectsPlane() {

  final Vector3 intersectionPoint = new Vector3();
  Plane plane = new Plane(new Vector3(0, 1, 0), 2);
  Ray3 pickRay = new Ray3(new Vector3(0, 3, 0), new Vector3(0, 0, 1));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, 3, 0), new Vector3(0, 1, 0));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, 2, 0), new Vector3(0, 1, 0));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, 1, 0), new Vector3(0, 1, 0));
  assertTrue(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, 0, 0), new Vector3(1, 0, 0));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -3, 0), new Vector3(0, 0, 1));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, 3, 0), new Vector3(0, -1, 0));
  assertTrue(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -3, 0), new Vector3(1, 1, 1));
  assertTrue(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -3, 0), new Vector3(-1, -1, -1));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  plane = new Plane(new Vector3(1, 1, 1), -2);
  pickRay = new Ray3(new Vector3(0, 0, 0), new Vector3(1, -1, 1));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -1, 0), new Vector3(0, 1, 0));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -2, 0), new Vector3(0, 1, 0));
  assertFalse(pickRay.intersectsPlane(plane, intersectionPoint));
  pickRay = new Ray3(new Vector3(0, -3, 0), new Vector3(0, 1, 0));
  assertTrue(pickRay.intersectsPlane(plane, null));
}