Automatic switching of Java SDK versions

I’ve been using SdkMan! for a long time, it makes it quite easy to manage multiple versions of different frameworks. I’ve been almost exclusivly using it to manage Java SDK versions over the past years, and although I’m mostly writing code in Kotlin recently every now and then I’m also looking at Java based projects. …

Parameterized Tests with JUnit 5 Jupiter

This post has originally been published on the codecentric blog. It was translated to english and slightly edited for this blog. A month back the JUnit team published the offical version of JUnit 5. There’s plenty of resources for high level overviews and if you want to catch up I can recommend this (german) article …

Using Lombok's @Builder annotation with default values

When writing Java, I’m a big fan of Lombok, a library that helps reduce boilerplate code through code-generation. I’ve written about it in the past, if you’re not familiar with it, checkout my previous posts here and here. Recently I’ve been confronted with the problem of providing defaults for generated Builder-classes generated by the @Builder …

Retrofit: My new HTTP client of choice

There’s no shortage of options for Java developers when dealing with HTTP connections client-side. Java itself brings facilities to work with HTTP, but they are very low level and inconvenient as is Apache’s HttpClient. I’ve been using some more high-level implementations in the past, Spring’s RestTemplate is often a good fit, the same goes for …

Jasmine BDD style testing for Java

During the last six months or so testing has become a special interest of mine. Most of my career I have worked in the Java ecosystem and the majority of tests I’ve seen and written have been using JUnit. Currently I’m looking into the Javascript world, where testing often is done in a different way. In contrast to Java, BDD-style tests are much more common here. There are some libraries that extend JUnit so that you can write tests in a different way, too, JBehave for example enables you to use Gherkin as a specification language, for which you then write a Java adapter that actually implements those specifications.

Lombok’s @Builder annotation and inheritance

I’ve written about Project Lombok’s @Builder annotation before (see here and here). We’ve started using it in our project some time ago in favour of the code generation library PojoBuilder. One thing has bugged me though during that time: Lombok’s @Builder annotation won’t generate code for inherited fields. It turns out, there is a solution to …