String base = "http://localhost:" + PORT;
String endpointAddress = base + "/bookstore/name-in-query";
WebClient wc = WebClient.create(endpointAddress);
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(1000000);
String name = "Many spaces";
wc.query("name", name);
String content = wc.get(String.class);
assertTrue(content.contains("<!DOCTYPE Something SYSTEM 'my.dtd'>"));
assertTrue(content.contains("<?xmlstylesheet href='" + base + "/common.css'?>"));
assertTrue(content.contains("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""));
assertTrue(content.contains("xsi:schemaLocation=\"" + base + "/book.xsd\""));