Skip to content
Advertisement

Jersey test framework: Test Container is null

I have the following test class that tests a simple "/helloWorld" endpoint that is implemented in jax-rs. I am running this as an EAR file in a JBOSS EAP Server locally.

JavaScript

When I run the test I get the following:

JavaScript

Advertisement

Answer

JerseyTest is not compatible with JUnit 5 at the moment.

https://github.com/jersey/jersey/issues/3662

From their workaround, add

JavaScript

to your class, and these two methods:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement