users@jersey.java.net

[Jersey] Use Jackson With the In-Memory Test Container?

From: <michael.iles_at_gmail.com>
Date: Fri, 21 Dec 2012 02:43:47 +0000 (GMT)

I just spent a frustrating few hours trying to figure out why my unit
tests wouldn't work with the in-memory container, and reached the
conclusion that the in-memory container wasn't respecting the app
descriptor when it returned a client.

(My app descriptor includes
.initParam("com.sun.jersey.api.json.POJOMappingFeature", "true"). )

This led me to this bug:
http://java.net/jira/browse/JERSEY-622?page=com.atlassian.jira.plugin.s
ystem.issuetabpanels%3Aall-tabpanel

If I read the bug correctly, there's a patch against 1.6 but this code
hasn't been put into production yet.

So is there any way to use Jackson with the in-memory test container?

If I copy the InMemoryTestContainerFactory and patch it... how will
Jersey find my new instance?

Or is my only option to switch to the Grizzly test container?

Thanks,
Mike.