### Question:
ProxyAwareResourceRetriever extends DefaultResourceRetriever { URL urlWithPlainTextForHttps(URL url) throws IOException { try { URI uri = url.toURI(); if (!uri.getScheme().equals("https")) { return url; } int port = url.getPort() > 0 ? url.getPort() : 443; String newUrl = "http: + (uri.getQuery() != null && uri.getQuery().length() > 0 ? "?" + uri.getQuery() : ""); logger.debug("using plaintext connection for https url, new url is {}", newUrl); return URI.create(newUrl).toURL(); } catch (URISyntaxException e) { throw new IOException(e); } } ProxyAwareResourceRetriever();  ProxyAwareResourceRetriever(URL proxyUrl);  ProxyAwareResourceRetriever(URL proxyUrl, boolean usePlainTextForHttps);   ProxyAwareResourceRetriever(URL proxyUrl, boolean usePlainTextForHttps, int connectTimeout, int readTimeout, int sizeLimit);  static final int DEFAULT_HTTP_CONNECT_TIMEOUT; static final int DEFAULT_HTTP_READ_TIMEOUT; static final int DEFAULT_HTTP_SIZE_LIMIT; }### Answer:
@Test void testUsePlainTextForHttps() throws IOException { ProxyAwareResourceRetriever resourceRetriever = new ProxyAwareResourceRetriever(null, true); String scheme = "https: String host = "host.domain.no"; String pathAndQuery = "/somepath?foo=bar&bar=foo"; URL url = URI.create(scheme + host + pathAndQuery).toURL(); assertEquals("http: resourceRetriever.urlWithPlainTextForHttps(url).toString()); }