@Test
public void testFromVectorToVector() {

  final Quaternion quat = new Quaternion().fromVectorToVector(Vector3.UNIT_Z, Vector3.UNIT_X);
  assertEquals(new Quaternion().fromAngleAxis(MathUtils.HALF_PI, Vector3.UNIT_Y), quat);
  quat.fromVectorToVector(Vector3.UNIT_Z, Vector3.NEG_UNIT_Z);
  assertTrue(Math
      .abs(new Vector3(0, 0, -1).distance(quat.apply(new Vector3(0, 0, 1), null))) <= Quaternion.ALLOWED_DEVIANCE);
  quat.fromVectorToVector(Vector3.UNIT_X, Vector3.NEG_UNIT_X);
  assertTrue(Math
      .abs(new Vector3(-1, 0, 0).distance(quat.apply(new Vector3(1, 0, 0), null))) <= Quaternion.ALLOWED_DEVIANCE);
  quat.fromVectorToVector(Vector3.UNIT_Y, Vector3.NEG_UNIT_Y);
  assertTrue(Math
      .abs(new Vector3(0, -1, 0).distance(quat.apply(new Vector3(0, 1, 0), null))) <= Quaternion.ALLOWED_DEVIANCE);
  quat.fromVectorToVector(Vector3.ONE, Vector3.NEG_ONE);
  assertTrue(Math
      .abs(new Vector3(-1, -1, -1).distance(quat.apply(new Vector3(1, 1, 1), null))) <= Quaternion.ALLOWED_DEVIANCE);
  quat.fromVectorToVector(Vector3.ZERO, Vector3.ZERO);
  assertEquals(Quaternion.IDENTITY, quat);
}