@Test
public void fromJavaNetUrlBadHost_checked() throws Exception {

    try {
        HttpUrl.getChecked("http://hostw ithspace/");
        fail();
    } catch (UnknownHostException expected) {
    }
}