@Override
    public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
        return unmarshal(exchange, (Object) stream);
    }
@Test
    public void testJsonApiUnmarshall() throws Exception {
        Class<?>[] formats = { MyBook.class, MyAuthor.class };
        JsonApiDataFormat jsonApiDataFormat = new JsonApiDataFormat(MyBook.class, formats);

        String jsonApiInput = this.generateTestDataAsString();

        Exchange exchange = new DefaultExchange(context);
        Object outputObj = jsonApiDataFormat.unmarshal(exchange, new ByteArrayInputStream(jsonApiInput.getBytes()));

        assertNotNull(outputObj);
        MyBook book = (MyBook) outputObj;
        assertEquals("Camel in Action", book.getTitle());
        assertEquals("1", book.getAuthor().getAuthorId());
    }