Spring Framework

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

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

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

Spring Batch Tutorial: Writing Information to an XML File

The previous part of my Spring Batch tutorial described how you can write information to a CSV File. This time you will learn to write the output data of your Spring Batch job to an XML file. After you have read this blog post, you: Can identify the dependencies which are required when you want […] Read more

Spring Batch Tutorial: Reading Information From an XML File

The previous part of my Spring Batch tutorial described how you can read information from a CSV File. This time you will learn to read the input data of your Spring Batch job from an XML file. After you have read this blog post, you: Can identify the dependencies which are required when you want […] Read more