Writing tests is time consuming and can contain many repetitive tasks like setting up the specific configuration and cleaning the context after the test.
To best follow the DRY (Don't Repeat Yourself) principle, I started implementing JUnit4 rules.
In this blog post, I will show how I migrated a JUnit4 rule to JUnit5.
Auditing can mean many different things;
sometimes it means saving every state change that occurs in your system on a remote server, and other times it means keeping a history of every state in your database.
Almost two years have passed since I wrote my first integration test for a Kafka Spring Boot application.
It took me a lot of research to write this first integration test and I eventually ended up to write a blog post on testing Kafka with Spring Boot.
There was not too much information out there about writing those tests and at the end it was really simple to do it, but undocumented.
I have seen a lot of feedback and interaction with my previous blog post and the GitHub Gist.
Since then spring-kafka-test changed two times the usage pattern and JUnit 5 has been introduces.
That means the…
ArchUnit is a great tool to enforce architectural rules for your java code base by writing simple unit tests.
Have you ever wondered why IntelliJ can't resolve properties in your application.properties or application.yml?
Short answer: you'll need an annotation processor in your classpath.