Utils { public static Boolean isURIValid(String str) { try { URI uri = new URI(str); } catch (NullPointerException e) { return false; } catch (URISyntaxException e) { return false; } return true; }  static Boolean isURIValid(String str); static Boolean isNullOrEmpty(String str); static String createBearerHeader(String accessToken);  }
@Test public void isURIValid() { assertTrue(Utils.isURIValid("www.google.com")); assertFalse(Utils.isURIValid(null)); }