users@jersey.java.net

Unit Testing JaxB bean

From: Jonathan Cook - FM&T <Jonathan.Cook2_at_bbc.co.uk>
Date: Sun, 28 Feb 2010 20:15:16 -0000

Hi,

I wondered if there was a way to get the actual xml or json from a jaxb
bean in a unit test? I can obviously test the get/set methods on the
bean but I thought it would be nice to test the serialized json or xml
as well. Can't see an obvious method to do this. Or do I have to setup
an http container to test this from a unit test?

Thanks
Jon