try {
WebClient wc = WebClient.create("http://localhost:9080/webapp/petstore");
HTTPConduit conduit = WebClient.getConfig(wc).getHttpConduit();
conduit.getClient().setReceiveTimeout(1000000);
conduit.getClient().setConnectionTimeout(1000000);
XMLSource source = wc.query("_code", "").query("_os", getOs()).get(XMLSource.class);
String link = source.getValue("ns:html/ns:body/ns:ul/ns:a/@href",
Collections.singletonMap("ns", "http://www.w3.org/1999/xhtml"));
WebClient wc2 = WebClient.create(link);
HTTPConduit conduit2 = WebClient.getConfig(wc2).getHttpConduit();
conduit2.getClient().setReceiveTimeout(1000000);