@VisibleForTesting
  static boolean isValidUrlFormat(String url) {
    Matcher matcher = URL_PATTERN.matcher(url);
    if (matcher.find()) {
      String host = matcher.group(2);
      return InetAddresses.isInetAddress(host) || InternetDomainName.isValid(host);
    }
    return false;
  }
@Test
  public void testMissingURLProtocol() {
    assertFalse(SplunkEventWriter.isValidUrlFormat("test-url"));
  }