Generate equals and hashCode in Java

1. Introduction In this tutorial, we're going to look at the different ways to generate the equals and hashCode methods in Java. 2. Default Impleme...

Continue Reading

Generate toString Method in Java

1. Overview In this tutorial, we're going to look at the different ways to generate the toString method. 2. Using StringJoiner Firstly, we'll use S...

Continue Reading

Convert String to Enum in Java

1. Introduction In this quick tutorial, we'll examine different ways of converting a String to an enum constant in Java. To be more precise, we'll ...

Continue Reading

Maven Surefire Plugin

1. Introduction In this tutorial, we'll examine the Maven Surefire Plugin. It is the plugin that runs the unit tests in a Maven project. 2. The Goa...

Continue Reading

Set Java Version on Maven

1. Overview In this tutorial, we're going to look at how we can set the Java version on a Maven project. To compile our source code, Maven uses the...

Continue Reading

Run a Single Test using Maven

1. Overview In this quick tutorial, we'll look at how we can run a single test using Maven. 2. Unit Tests We'll first look at the unit tests. 2.1. ...

Continue Reading

Guide to Selecting Tests with Maven

1. Overview In this tutorial, we're going to look at how we can select unit tests using Maven. For this purpose, we'll examine different configurat...

Continue Reading

Debug Tests using Maven

1. Overview In this tutorial, we're going to look at how we can debug our unit tests and integration tests using Maven. For this purpose, we'll exa...

Continue Reading

Guide to Java Formatter

1. Overview String.format, System.out.printf and System.out.format, all use the Formatter class to provide rich formatting functionalities. In this...

Continue Reading

Set System Property for Tests using Maven

1. Overview In this tutorial, we'll look at how we can set a Java system property for the tests run by Maven. By doing this, we can ignore tests ac...

Continue Reading