tl;dr When tests are hard to write, it’s because they are trying to tell you how the production design can be improved. Probably the biggest breakthrough during my Unit Testing workshop is to realize that …
refactoring
Avoiding NullPointerException
The terrible NullPointerException (NPE in short) is the most frequent Java exception occurring in production, acording to a 2016 study. In this article we’ll explore the main techniques to fight it: the self-validating model and …