Posts about java

The Step Builder problem 29 Apr 2021

We designed our API. We created a POJO that we want to be immutable. To make it easier to instantiate it, we provide a builder. But to make it even more user friendly, we made it a step builder. So whoever wants to instantiate my POJO can easily concatenate the methods, and the IDE will complete with the correct method time after time.

The JUnit exception problem 06 Jun 2020

We wrote a method that is supposed to throw an exception in some cases and we want to test it. We have a big problem!