
JUnit 5 for Kotlin Developers
1. Introduction The newly released JUnit 5 is the next version of the well-known testing framework for Java. This version includes a number of features that specifically target […]
1. Introduction The newly released JUnit 5 is the next version of the well-known testing framework for Java. This version includes a number of features that specifically target […]
1. Introduction In this quick article, we’ll show how to integrate Mockito with the JUnit 5 extension model. To learn more about the JUnit 5 extension […]
1. Introduction In this quick article, we’ll take a look at the new @SpringJUnitConfig and @SpringJUnitWebConfig annotations available in Spring 5. These annotations are a composition of JUnit 5 […]
1. Introduction In this article, we’re going to explore in details the assertions available within JUnit. Following the migrating from JUnit 4 to JUnit 5 and A Guide […]
1. Introduction In this quick tutorial, we’ll be looking at how to test if an exception was thrown using the JUnit library. We will, of […]
1. Overview In this short tutorial, we’re going to explain the differences between the @Before, @BeforeClass, @BeforeEach and @BeforeAll annotations in JUnit 4 and 5 — with practical examples of how […]
1. Overview In this article, we’ll make a quick review of JUnit’s @Test annotation. This annotation provides a powerful tool for performing unit and regression testing. 2. […]
1. Overview JUnit is one of the most popular unit-testing frameworks in the Java ecosystem. The JUnit 5 version contains a number of exciting innovations, with the […]
1. Java String.String() String objects can be created by either using literals: or by calling one of the constructors: If we use the String literal, it’ll try to reuse […]
1. Overview Simply put, the Apache Commons Text library contains a number of useful utility methods for working with Strings, beyond what the core Java offers. […]
1. Remove Special Characters from a String Let’s start by removing all special characters from a String. In the following example, we remove all characters that aren’t […]
1. Overview The Apache Commons Lang 3 library provides support for manipulation of core classes of the Java APIs. This support includes methods for handling strings, numbers, […]
1. Overview In this tutorial, we’ll look at how to convert an InputStream to a String. We’ll start by using plain Java, including Java8/9 solutions, then look into […]
1. Introduction Converting char to String instances is a very common operation. In this article, we will show multiple ways of tackling this situation. 2. String.valueOf() The String class has a […]
1. Introduction Converting a String to an int or Integer is a very common operation in Java. In this article, we will show multiple ways of dealing with this issue. There […]
1. Overview When dealing with Strings in Java, sometimes we need to encode them into a specific charset. This tutorial is a practical guide showing different […]
1. Overview In this short tutorial, we’re going to look at converting an array of strings or integers to a string and back again. We […]
1. Introduction We frequently need to convert between String and byte array in Java. In this tutorial, we’ll examine these operations in detail. First, we’ll look at various ways […]
1. Overview In this tutorial, we’ll take a look at different ways to convert a byte array to a hexadecimal String, and vice versa. We’ll also understand […]
1. Overview In this quick tutorial, we’ll see how to convert a ZonedDateTime to a String. We’ll also look at how to parse a ZonedDateTime from a String. 2. Creating a ZonedDateTime […]