Writing Unit Test With MockMvcTester: Returning an Object as JSON

This blog post describes how we can write unit tests for a Spring MVC REST API endpoint that returns an object as JSON. We will identify the tests we must write, learn to eliminate duplicate request building code from our test class, and write assertions for the HTTP response with MockMvcTester and AssertJ. Read More

Clean Test Automation Monthly 4 / 2025

The Clean Test Automation Monthly is a monthly blog post that highlights interesting or useful test automation content which I read during the current month. This blog post shares 20 interesting or useful blog posts which I read during April 2025. Read More

Writing Unit Tests With MockMvcTester: Returning a List as JSON

This blog post describes how we can write unit tests for a Spring MVC REST API endpoint that returns a list as JSON. We will identify the tests we must write, learn to eliminate duplicate request building code from our test class, and write assertions for the HTTP response with MockMvcTester and AssertJ. Read More

Clean Test Automation Monthly 3 / 2025

The Clean Test Automation Monthly is a monthly blog post that highlights the best test automation content which I read during the current month. This blog post highlights the best test automation content of March 2025. Read More

Clean Test Automation Monthly 2 / 2025

The Clean Test Automation Monthly is a monthly blog post that highlights the best test automation content which I read during the current month. This blog post highlights the best test automation content of February 2025. Read More

Introduction to MockMvcTester

This blog post describes what MockMvcTester is and explains why we should use it. We will also learn to configure MockMvcTester, send HTTP requests to the system under test, and write assertions for the returned HTTP response. Read More