REST APIs are becoming more and more pervasive nowadays. For that reason, a proper strategy for assessing REST services is desirable. In this section, we are going to learn how to use several test libraries in our JUnit 5 tests.
First of all, we can use the open source library REST Assured (http://rest-assured.io/). REST Assured allows the validation of REST services by means of a fluent API inspired in dynamic languages such as Ruby or Groovy. To use REST Assured in our test project, we simply need to add the proper dependency in Maven:
<dependency> <groupId>io.rest-assured</groupId> <artifactId>rest-assured</artifactId> <version>${rest-assured.version}</version> <scope>test</scope></dependency>