@Test
public void testBothProxiesDefined() throws HttpException {

    System.setProperty("http.proxyHost", "httpProxy");
    System.setProperty("http.proxyPort", "9090");
    System.setProperty("https.proxyHost", "httpsProxy");
    System.setProperty("https.proxyPort", "9443");
    assertEquals("httpProxy:9090", ProxyAddressSelector.getProxyForUrl("http://www.jahia.com"));
    assertEquals("httpsProxy:9443", ProxyAddressSelector.getProxyForUrl("https://www.jahia.com"));
    assertEquals("httpProxy:9090", ProxyAddressSelector.getProxyForUrl("http://localhost:8080"));
    assertEquals("httpsProxy:9443", ProxyAddressSelector.getProxyForUrl("https://localhost:8080"));
    assertEquals("httpProxy:9090", ProxyAddressSelector.getProxyForUrl("www.jahia.com:9090"));
    assertEquals("httpProxy:9090", ProxyAddressSelector.getProxyForUrl("localhost:9090"));
    assertNull(ProxyAddressSelector.getProxyForUrl("/aaa.html"));
}