TransformingProxyPlugin extends ProxyPlugin { public HttpUrl createHttpsGatewayUrl(String gatewayUrl) throws MalformedURLException, URIException { HttpMethod method = new GetMethod(gatewayUrl); method.setQueryString("ssl=true"); String url = method.getURI().getEscapedURI(); return new HttpUrl(url); } TransformingProxyPlugin(RequestTransformer requestTransformer,
			ResponseTransformer responseTransformer, String gatewayUrl); protected  TransformingProxyPlugin(); @Override String getPluginName(); @Override HTTPClient getProxyPlugin(HTTPClient in); HttpUrl createHttpsGatewayUrl(String gatewayUrl);  }
@Test public void testCreateHttpsGatewayUrl_Portnumber_as_last_Part_of_Url() throws Exception { String url = "http: String expected = "http: HttpUrl actualUrl = underTest.createHttpsGatewayUrl(url); String actual = actualUrl.toString(); Assert.assertEquals(expected, actual); }
@Test public void testCreateHttpsGatewayUrl_Slash_Suffix() throws Exception { String url = "http: String expected = "http: HttpUrl actualUrl = underTest.createHttpsGatewayUrl(url); String actual = actualUrl.toString(); Assert.assertEquals(expected, actual); }