UrlUtils { public static boolean isValid(String url) { if (url == null || url.isEmpty()) return false; url = url.toLowerCase(); return url.startsWith("http:") || url.startsWith("https:"); }  static boolean isValid(String url);  }
@Test public void testValidUrls() { assertTrue(UrlUtils.isValid("htTp: assertTrue(UrlUtils.isValid("HttpS: }
@Test public void testNotValidUrls() { assertFalse(UrlUtils.isValid("htt: assertFalse(UrlUtils.isValid(": }