@Test
public void testCreateFromStringInvalid() throws Exception {

    try {
        HttpHost.create(" host ");
        Assert.fail("URISyntaxException expected");
    } catch (final URISyntaxException expected) {
    }
    try {
        HttpHost.create("host :8080");
        Assert.fail("URISyntaxException expected");
    } catch (final URISyntaxException expected) {
    }
    try {
        HttpHost.create("");
        Assert.fail("IllegalArgumentException expected");
    } catch (final IllegalArgumentException expected) {
    }
}