GenericEntity<List<Book>> collectionEntity = createGenericEntity();
final Holder<Book> holder = new Holder<Book>();
InvocationCallback<Book> callback = createCallback(holder);
Future<Book> future = wc.async().post(Entity.entity(collectionEntity, "application/xml"),
callback);
Book book = future.get();
assertEquals(200, wc.getResponse().getStatus());
assertSame(book, holder.value);
assertNotSame(collectionEntity.getEntity().get(0), book);