// Hash codes MUST be equal for same object,
// should be different for different objects
// and must be consistent
int a = x.hashCode();
ComplexArray z = x.clone();
assertEquals(a, x.hashCode()); // Consistent
assertEquals(a, x.hashCode()); // Consistent
assertEquals(x.hashCode(), x.hashCode()); // Same for same object
System.out.println("x: " + x + ", hashcode " + x.hashCode());
System.out.println("y: " + y + ", hashcode " + y.hashCode());
System.out.println("z: " + z + ", hashcode " + z.hashCode());
assertEquals(z.hashCode(), x.hashCode()); // Same for equivalent object
assertFalse(x.hashCode() == y.hashCode()); // Different for different objects
}