Search results for: Open API

Testing is an essential skill for any Java developer. It helps you ensure the quality and reliability of your code, as well as find and fix bugs faster. On this page, you will find a collection of tutorials that will teach you how to test Java code using JUnit 5 and Mockito. JUnit 5 is…

Read More Testing Java Code

Welcome to a tutorial on Docker’s best practices and considerations for production. By the end of this tutorial, you will understand what Docker is, why it’s beneficial, and the best practices for using Docker in a production environment. To learn more about Docker, check out other Docker tutorials for beginners. This tutorial is designed for…

Read More Docker in Production: Best Practices and Considerations

Mocking a static or private method is often necessary when writing unit tests. However, before Mockito 3.4.0, it was impossible to explicitly mock static methods. Thus, PowerMock offers solutions to the defined use case. In this article, we will look at the introduction of PowerMock and explore examples of mocking private, static, and final methods.…

Read More A Guide to Mocking Private and Static Methods Using PowerMock

Docker and DevOps are pivotal in modern development workflows. In this beginner-friendly tutorial, I will guide you through the integration of Docker with Continuous Integration and Continuous Deployment (CI/CD) pipelines, explaining each concept in detail for a better understanding. To learn more about Docker, please check out my other Docker Tutorials for Beginners. Prerequisites Before…

Read More Docker and DevOps: How Docker Integrates with CI/CD Pipelines

In this tutorial, we will explore how to ignore unknown JSON fields in Java using Jackson. We will cover the default behaviour, ignoring unknown properties on a class level, ignoring unknown properties globally, and how to deal with incomplete JSON. Additionally, we will discuss security concerns related to ignoring unknown properties using annotations. If you’re…

Read More Ignore Unknown JSON Fields with Java Jackson

In this tutorial, you will learn about the difference between two Spring Boot dependencies – Spring Boot Actuator and Spring Boot Starter Actuator. If you’re new to Spring Boot, these terms may sound confusing, but don’t worry, by the end of this tutorial, you’ll understand the difference between them. Spring Boot is a popular framework…

Read More Spring Boot Actuator vs Spring Boot Starter Actuator

In a microservices architecture, it is common to have multiple services communicating with each other over the network. This distributed nature of the architecture can make it challenging to diagnose and debug issues when they arise. To address this problem, developers often use monitoring(Micrometer) and tracing tools(Zipkin) to track the flow of requests between microservices.…

Read More Micrometer and Zipkin: How to Trace HTTP Requests in Spring Boot 3

In this REST Assured tutorial, I will demonstrate how to evaluate the JSON content that is returned in the response body of an HTTP response. What is REST Assured? REST Assured is a Java-based library for testing RESTful web services. It provides a domain-specific language (DSL) for writing tests that interact with web services using…

Read More Validate JSON Response with REST Assured