@Test
public void readsObjectFromEntityStream() throws Exception {

    Book book = (Book)reader.readFrom(Book.class, null, null, APPLICATION_XML_TYPE, new MultivaluedMapImpl(), new ByteArrayInputStream(TEST_XML_CONTENT_BYTES));
    assertEquals("Java and XML Data Binding", book.getTitle());
    assertTrue(book.isSendByPost());
    assertEquals("Brett McLaughlin", book.getAuthor());
    assertEquals("USD", book.getPrice().getCurrency());
    assertEquals(new BigDecimal("34.95"), book.getPrice().getValue());
    assertEquals("USD", book.getMemberPrice().getCurrency());
    assertEquals(new BigDecimal("26.56"), book.getMemberPrice().getValue());
}