Not all equals methods are created equal

Slides for my talks 🎤

How to write a good equals method, and to test it with EqualsVerifier.


Did you know your equals method can contain bugs, even if you have it generated by your IDE?

I will show you how to recognise these potential bugs, and why you should care about them. You will see how to craft an ironclad equals method. Also, you will see how to test your equals method and gain 100% coverage with a single line of test code, using EqualsVerifier. Because testing equals shouldn’t have to take pages of code.

Show me the code!

  • All code can be found on github


  • 6 November 2017, Devoxx Belgium: [event] [slides] [video]
  • 19 March 2015, Sogeti: [slides]
  • 25 November 2014, Sogeti: [slides]
  • 24 August 2013, Sioux Weekend of Code: [slides]