assertNotNull(response.getEntity());
assertEquals("application/json;charset=ISO-8859-1", response.getEntity().getContentType().getValue());
ObjectMapper mapper = new ObjectMapper();
JsonNode tree = mapper.readTree(response.getEntity().getContent());
JsonNodeFactory factory = JsonNodeFactory.instance;
JsonNode expected = factory.objectNode().set("foo", factory.textNode("bar"));
assertEquals(expected, tree);
}
}