bean.getInInterceptors().add(sigInInterceptor);
WebClient wc = bean.createWebClient();
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
try {
Book book;
if (!fromResponse) {
book = wc.post(new Book("CXF", 126L), Book.class);
} else {
book = wc.post(new Book("CXF", 126L)).readEntity(Book.class);
}
assertEquals(126L, book.getId());
} catch (WebApplicationException ex) {
fail(ex.getMessage());
} catch (ProcessingException ex) {
if (ex.getCause() != null && ex.getCause().getMessage() != null) {
fail(ex.getCause().getMessage());