@Test
public void testCreateXmlRequestURLDefaultPortHttps() throws Exception {

    final XmlRequest xmlRequest = new GeonetHttpRequestFactory().createXmlRequest(new URL
        ("https://host/path?queryString#fragment"));
    final HttpRequestBase httpRequestBase = xmlRequest.setupHttpMethod();
    assertTrue(httpRequestBase instanceof HttpGet);
    assertEquals("host", httpRequestBase.getURI().getHost());
    //Expects -1 instead of 80, this sentinal value will remove the :443 from the URI.
    assertEquals(-1, httpRequestBase.getURI().getPort());
    assertEquals("https", httpRequestBase.getURI().getScheme());
    assertEquals("/path", httpRequestBase.getURI().getPath());
    assertEquals("queryString", httpRequestBase.getURI().getQuery());
    assertEquals("fragment", httpRequestBase.getURI().getFragment());
}