@Test
public void testCreateFromString() throws Exception {

    Assert.assertEquals(new HttpHost("https", "somehost", 8080), HttpHost.create("https://somehost:8080"));
    Assert.assertEquals(new HttpHost("https", "somehost", 8080), HttpHost.create("HttpS://SomeHost:8080"));
    Assert.assertEquals(new HttpHost(null, "somehost", 1234), HttpHost.create("somehost:1234"));
    Assert.assertEquals(new HttpHost(null, "somehost", -1), HttpHost.create("somehost"));
}