@Test
public void readsContentOfEntityStreamAsJsonValue() throws Exception {

    String content = "{\"title\": \"JUnit in Action\", \"pages\": 386, \"isdn\": 93011099534534, \"price\": 19.37, \"author\": \"Vincent Massol\"}";
    JsonValue result = (JsonValue)jsonEntityProvider.readFrom(JsonValue.class, null, null, APPLICATION_JSON_TYPE, new MultivaluedMapImpl(),
                                                              new ByteArrayInputStream(content.getBytes()));
    assertEquals("Vincent Massol", result.getElement("author").getStringValue());
    assertEquals("JUnit in Action", result.getElement("title").getStringValue());
    assertEquals(386, result.getElement("pages").getIntValue());
    assertEquals(19.37, result.getElement("price").getNumberValue());
    assertEquals(93011099534534L, result.getElement("isdn").getLongValue());
}