@Test
public void testCreateXmlRequestURL() throws Exception {

    final XmlRequest xmlRequest = new GeonetHttpRequestFactory().createXmlRequest(new URL
        ("http://user:pass@host:1234/path?queryString#fragment"));
    final HttpRequestBase httpRequestBase = xmlRequest.setupHttpMethod();
    assertTrue(httpRequestBase instanceof HttpGet);
    assertEquals("host", httpRequestBase.getURI().getHost());
    assertEquals("user:pass", httpRequestBase.getURI().getUserInfo());
    assertEquals(1234, httpRequestBase.getURI().getPort());
    assertEquals("http", httpRequestBase.getURI().getScheme());
    assertEquals("/path", httpRequestBase.getURI().getPath());
    assertEquals("queryString", httpRequestBase.getURI().getQuery());
    assertEquals("fragment", httpRequestBase.getURI().getFragment());
}