@Test
public void readsContentOfEntityStreamAsObject() throws Exception {

    String content = "{\"title\": \"JUnit in Action\", \"pages\": 386, \"isdn\": 93011099534534, \"price\": 19.37, \"author\": \"Vincent Massol\"}";
    Book result = (Book)jsonEntityProvider.readFrom(Book.class, null, null, APPLICATION_JSON_TYPE, new MultivaluedMapImpl(),
                                                    new ByteArrayInputStream(content.getBytes()));
    assertEquals("Vincent Massol", result.getAuthor());
    assertEquals("JUnit in Action", result.getTitle());
    assertEquals(386, result.getPages());
    assertEquals(19.37, result.getPrice(), 0.01);
    assertEquals(93011099534534L, result.getIsdn());
}