Links { public static boolean isValid(String link) { if ( link == null ) return false; if (! link.startsWith("http:") && ! link.startsWith("https:")) { return false; } return isValidWithValidator(link) || isValidAsURI(link); }  static boolean isValid(String link); static void checkValid(String link); static Link parse( String link );  }
@Test public void testIsValid() throws Exception { assertTrue(Links.isValid("http: assertTrue(Links.isValid("http: assertTrue(Links.isValid("http: assertTrue(Links.isValid("http: assertTrue(Links.isValid("http: assertTrue(Links.isValid("http: assertTrue(Links.isValid("https: assertFalse(Links.isValid("ftp: assertFalse(Links.isValid(null)); assertFalse(Links.isValid("")); assertFalse(Links.isValid("http: }