String endpointAddress = "http://localhost:" + PORT + "/bookstore/books2/mistyped";
WebClient wc = WebClient.create(endpointAddress,
Collections.singletonList(new ReplaceBodyFilter()));
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(1000000L);
wc.accept("text/mistypedxml").type("text/xml").header("THEMETHOD", "PUT");
Book book = wc.invoke("DELETE", new Book("book", 555L), Book.class);
assertEquals(561L, book.getId());
}
@Test
public void testPostGetCollectionGenericEntityAndType() throws Exception {