private void doHttpsTest(final WebClient webClient) throws Exception { localServer_ = new InsecureHttpsServer(SocksProxyTestServlet.HTML); localServer_.start(); webClient.getOptions().setUseInsecureSSL(true); final String url = "https://" + localServer_.getHostName() + ":" + localServer_.getPort(); final HtmlPage page = webClient.getPage(url); assertEquals("hello", page.getTitleText()); }
/** @throws Exception if an error occurs */ @Override @After public void tearDown() throws Exception { if (localServer_ != null) { localServer_.stop(); } localServer_ = null; super.tearDown(); }