}
@Test
public void Quaternions()
{
Quaternion a = new Quaternion(1, 0, 0, 0);
Quaternion b = new Quaternion(1, 0, 0, 0);
Assert.assertTrue("Quaternion comparison operator failed", a.equals(b));
Quaternion expected = new Quaternion(0, 0, 0, -1);
Quaternion result = Quaternion.multiply(a , b);
Assert.assertTrue( a.toString() + " * " + b.toString() + " produced " + result.toString() +
" instead of " + expected.toString(), result.equals(expected));
a = new Quaternion(1, 0, 0, 0);
b = new Quaternion(0, 1, 0, 0);
expected = new Quaternion(0, 0, 1, 0);
result = Quaternion.multiply(a , b);
Assert.assertTrue(a.toString() + " * " + b.toString() + " produced " + result.toString() +
" instead of " + expected.toString(), result.equals(expected));
a = new Quaternion(0, 0, 1, 0);
b = new Quaternion(0, 1, 0, 0);
expected = new Quaternion(-1, 0, 0, 0);
result = Quaternion.multiply(a , b);
Assert.assertTrue(a.toString() + " * " + b.toString() + " produced " + result.toString() +
" instead of " + expected.toString(), result.equals(expected));
}