### Question:
UrlUtils { public static String describe(String url) { if (url.startsWith("http: return url.substring("http: if (url.startsWith("https: return url.substring("https: if (url.contains("/")) url = StringUtils.substringAfterLast(url, "/"); url = StringUtils.substringBeforeLast(url, "."); if (url.contains(".")) url = StringUtils.substringAfterLast(url, "."); url = StringUtils.substringBefore(StringUtils.replaceChars(url, "-_", " "), "?"); return WordUtils.capitalize(url); }  static boolean isRelative(String url); static String trimHashAndQuery(String url); static String describe(String url); static String encodePath(String url); static String decodePath(String url); static String encodeQuery(String query); static String decodeQuery(String query);  }### Answer:
@Test public void testDescribe() { assertEquals("File", UrlUtils.describe("file")); assertEquals("File", UrlUtils.describe("dir/file.txt")); assertEquals("File Name", UrlUtils.describe("dir/file-name.txt")); assertEquals("File Name", UrlUtils.describe("dir/file_name.txt")); assertEquals("File Name", UrlUtils.describe("dir.2/file_name.txt")); assertEquals("Google", UrlUtils.describe("www.google.com")); assertEquals("www.google.com", UrlUtils.describe("http: assertEquals("www.google.com", UrlUtils.describe("https: }