Skip to Content
Building RESTful Web Services with Java EE 8
book

Building RESTful Web Services with Java EE 8

by Mario-Leander Reimer
July 2018
Intermediate to advanced
116 pages
2h 41m
English
Packt Publishing
Content preview from Building RESTful Web Services with Java EE 8

Jersey Test Framework

Let's start with the Jersey Test Framework. We will switch to our IDE and in order to use the Jersey Test Framework, you need to add one simple dependency, as follows:

    <dependency>        <groupId>org.glassfish.jersey.test-            framework.providers</groupId>        <artifactId>jersey-test-framework-provider-          grizzly2</artifactId>        <version>${jersey.version}</version>        <scope>test</scope>    </dependency>

Jersey offers several test providers; in this case, we will be using the grizzly2 provider. What do you need to do to use this test framework? First of all, you need to implement a test class, say VersionResourceTest, and you need to make it extend the JerseyTest superclass. Next thing you need to do is override the configure method, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

RESTful Java Web Services - Third Edition

RESTful Java Web Services - Third Edition

Balachandar Bogunuva Mohanram

Publisher Resources

ISBN: 9781789532883Supplemental Content