@Test(expected = IOException.class)
public void throwsIOExceptionWhenParsingFailed() throws Exception {

    String invalidContent = "\"title\": \"JUnit in Action\"}";
    jsonEntityProvider.readFrom(Book.class, null, null, APPLICATION_JSON_TYPE, new MultivaluedMapImpl(),
                                new ByteArrayInputStream(invalidContent.getBytes()));
}