* For JAXB objects, there will be an error as the resource will return a
* text/plain representation.
*/
public void testAcceptHeaderForJAXB() {
try {
Echo e = client.resource(getBaseURI() + "/echoaccept").get(Echo.class);
fail();
// String value = e.getValue();
// assertTrue(value, value.contains(MediaType.APPLICATION_JSON));
// assertTrue(value, value.contains(MediaType.APPLICATION_XML));
// assertTrue(value, value.contains(MediaType.TEXT_XML));
// assertTrue(value, value.contains("application/javascript"));
} catch (RuntimeException e) {
assertEquals(e.getMessage(),
String
.format("A javax.ws.rs.ext.MessageBodyReader implementation was not found for class %s type and %s media type. Verify that all entity providers are correctly registered. Add a custom javax.ws.rs.ext.MessageBodyReader provider to handle the type and media type if a JAX-RS entity provider does not currently exist.",
Echo.class.getName(),
MediaType.TEXT_PLAIN));
}