String address = "http://localhost:" + PORT + "/bookstore/bookheaders/404";
WebClient wc = createWebClient(address);
final Holder<Object> holder = new Holder<Object>();
InvocationCallback<Object> callback = createCallback(holder);
try {
wc.async().get(callback).get();
fail("Exception expected");
} catch (ExecutionException ex) {
assertTrue(ex.getCause() instanceof NotFoundException);
assertTrue(ex.getCause() == ((ClientException)holder.value).getCause());
}