Presented in Saint Petersburg in May 2018 at Heisenbug conference. Video and slides are in Russian.
Best kind of tests are ones that cost almost nothing, yet find defects. We’ll talk about two Java tools that are close to this ideal. First tool is EqualsVerifier library, which helps with testing equals() and hashCode() contracts. The second tool is ErrorProne from Google — a compile-time checker for common mistakes in your code.
This talk will be useful for testers and Java developers.
Download slides in Russian (PDF)
- “Not all equals methods are created equal” by Jan Ouwens
- How to Write an Equality Method in Java
- How Do I Correctly Implement the equals() Method?
- Error Prone
- AutoValue — Google way to create value objects
- Immutables — Java annotation processor to create value objects and more