### Question:
APISettings { static String checkHost(String host) { Preconditions.checkArgument(host == null || (!host.startsWith("http: "host should not include a URI scheme: %s", host); return host; } private  APISettings(String host, int port, int securePort, Config config); static APISettings create(Config config); String getHost(); int getPort(); int getSecurePort(); boolean isSecure(); File getKeystoreFile(); String getKeystorePassword(); String getUserName(); String getPassword();  }### Answer:
@Test public void testHost() { String validHost = "example.com"; assertEquals(validHost, APISettings.checkHost(validHost)); }
@Test(expected = IllegalArgumentException.class) public void testUriHost() { APISettings.checkHost("http: }