Introduction to TestNG 1. Overview In this article, we’ll introduce the TestNG testing framework. We’ll focus on: framework setup, writing simple test case and configuration, test execution, test reports generation, and concurrent test execution. 2. Setup Let’s start by adding the Maven dependency in our pom.xml file: <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId>… Continue Reading testng

Repositories with Multiple Spring Data Modules 1. Introduction Sometimes we need to connect to more than one database technology in the same application. In this tutorial, we’ll explore the various configuration options when it comes to using multiple Spring Data modules in the same application. Let’s use a toy Spring… Continue Reading spring-multiple-data-modules

Guava – Join and Split Collections 1. Overview In this tutorial, we will learn how to use the Joiner and Splitter in the Guava library. We’ll convert collections into a String with the Joiner and we’ll split a String into a collection with the Splitter. 2. Convert List into String… Continue Reading guava-joiner-and-splitter-tutorial

Spring – Injecting Collections 1. Introduction In this tutorial, we’re going to show how to inject Java collections using the Spring framework. Simply put, we’ll demonstrate examples with the List, Map, Set collection interfaces. 2. List with @Autowired Let’s create an example bean: public class CollectionsBean { @Autowired private List<String> nameList;… Continue Reading spring-injecting-collections