A Better Way to Test Object Equality in Java Unit Tests

Testing for object equality can be painful, but it doesn't have to be.