### Question:
UrlUtil { public static boolean isValid(String theUrl) { if (theUrl == null || theUrl.length() < 8) { return false; } String url = theUrl.toLowerCase(); if (url.charAt(0) != 'h') { return false; } if (url.charAt(1) != 't') { return false; } if (url.charAt(2) != 't') { return false; } if (url.charAt(3) != 'p') { return false; } int slashOffset; if (url.charAt(4) == ':') { slashOffset = 5; } else if (url.charAt(4) == 's') { if (url.charAt(5) != ':') { return false; } slashOffset = 6; } else { return false; } if (url.charAt(slashOffset) != '/') { return false; } if (url.charAt(slashOffset + 1) != '/') { return false; } return true; }  static String constructAbsoluteUrl(String theBase, String theEndpoint); static String constructRelativeUrl(String theParentExtensionUrl, String theExtensionUrl); static String escapeUrlParam(String theUnescaped); static boolean isAbsolute(String theValue); static boolean isNeedsSanitization(CharSequence theString); static boolean isValid(String theUrl); static RuntimeResourceDefinition parseUrlResourceType(FhirContext theCtx, String theUrl); static Map<String, String[]> parseQueryString(String theQueryString); static Map<String, String[]> parseQueryStrings(String... theQueryString); static UrlParts parseUrl(String theUrl); static String sanitizeUrlPart(IPrimitiveType<?> theString); static String sanitizeUrlPart(CharSequence theString); static String[] sanitizeUrlPart(String[] theParameterValues); static String unescape(String theString); static List<NameValuePair> translateMatchUrl(String theMatchUrl);  }### Answer:
@Test public void testIsValid() { assertTrue(UrlUtil.isValid("http: assertTrue(UrlUtil.isValid("https: assertTrue(UrlUtil.isValid("HTTP: assertTrue(UrlUtil.isValid("HTTPS: assertFalse(UrlUtil.isValid("file: assertFalse(UrlUtil.isValid(": assertFalse(UrlUtil.isValid("http:/ss")); assertFalse(UrlUtil.isValid("http:/")); assertFalse(UrlUtil.isValid("http:")); assertFalse(UrlUtil.isValid("h")); assertFalse(UrlUtil.isValid("")); assertFalse(UrlUtil.isValid(null)); }