Have you ever written an equals method, along with five screens of unit tests to test it? Or worse: not bothered to test it at all, because “the IDE generates it anyway”?

EqualsVerifier helps you. Testing equals can be as simple as:

public void equalsContract() {

If you feel EqualsVerifier is too strict, you can make it more lenient:

public void simpleEqualsContract() {

And EqualsVerifier even gives you 100% coverage on equals and hashCode methods.

Don’t forget to add it to your build!