Articles

In part 1, we introduced Instancio and how it can be used to automate data setup in unit tests. To recap, Instancio is a library that automates data setup in unit tests, with the goal of reducing manual data setup. More specifically, it accepts a class (or a « type token ») as an argument and returns a fully-populated instance of the class. Sticking to our Person class for all our examples, this can be done as follows:

Java

 

Person person = Instancio.create(Person.class); Map<UUID, Person> person = Instancio.create(new TypeToken<Map<UUID, Person>>() {});

Source de l’article sur DZONE

In this article, you will see how to create a UUID in Java.

Introduction

A UUID, or a universally unique identifier, is a 128-bit number used to identify information in computer systems.

Source de l’article sur DZONE