@Udf
  public String extractProtocol(
      @UdfParameter(description = "a valid URL to extract a protocl from") final String input) {
    return UrlParser.extract(input, URI::getScheme);
  }
@Test
  public void shouldThrowExceptionForMalformedURL() {
    // When:
    final KsqlException e = assertThrows(
        KsqlException.class,
        () -> extractUdf.extractProtocol("http://257.1/bogus/[url")
    );

    // When:
    assertThat(e.getMessage(), containsString("URL input has invalid syntax: http://257.1/bogus/[url"));
  }