### Question:
UrlUtilities { public static boolean isFile(URL url) { boolean isFile = false; String protocol = url.getProtocol(); if ("file".equalsIgnoreCase(protocol) || "jar".equalsIgnoreCase(protocol)) { isFile = true; } return isFile; } private  UrlUtilities(); static String getBaseURL(URL u); static String getBaseURL(String u); static ThreeTuple<String, String, Integer> getProtocolHostPort(String url, int defaultPort); static boolean isFragmentPresent(URL url); static String getFragment(URL url); static boolean isFile(URL url); static URL toURL(String urlString); static URL toURLNew(String urlOrPathString); static String concatUrlFragments(String... fragments);  }### Answer:
@Test public void testIsFile() throws MalformedURLException { URL fileUrl = new URL("file:/C:/test.txt"); URL javaFileUrl = new URL("jar:file:/C:/Program%20Files/OpenSphere/OpenSphere-KML-plugin.jar!" + "/images/maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png"); URL httpUrl = new URL("http: assertTrue(UrlUtilities.isFile(fileUrl)); assertTrue(UrlUtilities.isFile(javaFileUrl)); assertFalse(UrlUtilities.isFile(httpUrl)); }