@Test
public void testInvert() {

  final Quaternion quat1 = new Quaternion(0, 1, 2, 3);
  final Quaternion quat2 = quat1.invert(null);
  assertEquals(Quaternion.IDENTITY, quat1.multiply(quat2, null));
  assertEquals(quat1, quat2.invert(new Quaternion()));
  assertEquals(quat1, quat2.invertLocal());
  // normalized version
  quat1.fromAngleAxis(MathUtils.QUARTER_PI, Vector3.UNIT_Y);
  quat1.invert(quat2);
  assertEquals(Quaternion.IDENTITY, quat1.multiply(quat2, null));
  assertEquals(quat1, quat2.invert(new Quaternion()));
  assertEquals(quat1, quat2.invertLocal());
  // conjugate check
  assertEquals(new Quaternion(-1, -2, -3, 4), new Quaternion(1, 2, 3, 4).conjugate(null));
}