users@jersey.java.net

[Jersey] Re: Resource locator unit test with ResourceContext

From: Marek Potociar <marek.potociar_at_oracle.com>
Date: Fri, 7 Nov 2014 18:35:42 +0100

You can use Jersey Test Framework <https://jersey.java.net/documentation/latest/test-framework.html> to test your business logic code.

Marek

> On 03 Oct 2014, at 16:13, abrian_at_netapp.com wrote:
>
> I have resource locators that use ResourceContext to create the sub
> resource class. When I attempt to tests those locator methods, I need
> to provide a ResourceContext (which is normally injected). Is there a
> good strategy for that? Mocking is somewhat cumbersome, and I'm
> wondering if there isn't a better way.
>
> Thanks