Just doing a hashcode check doesn't make much sense. When I do stuff which hash code, I also involve equals.

So 
assertEquals(ref1.hashCode(), ref2.hashCode());
assertEquals(ref1 ref2);
assertEquals(ref2 ref1);

Then you have covered the full equals/hash contract.