Tests of equals, hashCode and related