When writing unit-tests, I often face the situation when equals() for some object in tests -- in assertEquals -- should work differently from how it wo
I would not think about the unit test when writing a equals() both are different.
You define the equality of each object with one or group of properties by implementing equals() and hashcode().
In your test if you want to compare all the properties of the object, then obviously you need to call each method.
I think it is better to treat them separately.