Presented in Saint Petersburg in May 2018 at Heisenbug conference. Video and slides are in Russian.
# Abstract
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.
# Materials
Download slides in Russian (PDF)
Slides — https://speakerdeck.com/asatarin/equalsverifier-errorprone-i-vsie-vsie-vsie-gieizienbagh-pitier-2018
Video link — https://youtu.be/jeCpYOEuL64
# References
- EqualsVerifier
- “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