Factory Method Pattern for Spring Hateoas Links

Problem Description You have a single class in your application where you create Hateoas Links for different API versions (e.g.: V1 and V2). The class grows quickly with time as you add a lot of logic for those versions. You want to refactor the existing class so that it is easier to be modified for […]

Testing HTTP Methods using Mockito framework

In this post, you will learn how to create HTTP methods in Spring Boot and test them using the Mockito framework. If you are not familiar with unit testing, see my post on Medium. For those who are impatient, you can find the source code on GitHub. HTTP Verbs Overview The most-commonly-used HTTP verbs are […]