@Udf(description = "Returns a masked version of the input string. The last n characters"
      + " will be replaced according to the default masking rules.")
  @SuppressWarnings("MethodMayBeStatic") // Invoked via reflection
  public String mask(
      @UdfParameter("input STRING to be masked") final String input,
      @UdfParameter("number of characters to mask before the end") final int numChars
  ) {
    return doMask(new Masker(), input, numChars);
  }
@Test
  public void shouldThrowIfLengthIsNegative() {
    // When:
    final KsqlException e = assertThrows(
        KsqlFunctionException.class,
        () -> udf.mask("AbCd#$123xy Z", -1)
    );

    // Then:
    assertThat(e.getMessage(), containsString("function mask_right requires a non-negative number"));
  }