EurekaUris { public static URI failIfEurekaUriInvalid(URI eurekaUri) { Preconditions.checkArgument(isEurekaScheme(eurekaUri), "Not Eureka scheme in URI: %s", eurekaUri); Preconditions.checkArgument(StringExt.isNotEmpty(eurekaUri.getHost()), "Service name not defined in URI: %s", eurekaUri); return eurekaUri; }  static URI failIfEurekaUriInvalid(URI eurekaUri); static String getServiceName(URI eurekaUri); static boolean isEurekaScheme(URI eurekaUri); static boolean isSecure(URI eurekaUri); static final String EUREKA_SCHEME; static final String EUREKA_SECURE_PARAM; }
@Test(expected = IllegalArgumentException.class) public void testFailIfInvalidProtocol() { EurekaUris.failIfEurekaUriInvalid(URI.create("http: }
@Test(expected = IllegalArgumentException.class) public void testFailIfInvalidServiceName() { EurekaUris.failIfEurekaUriInvalid(URI.create("eureka: }