@Udf
  public String concatWS(
      @UdfParameter(description = "Separator string and values to join") final String... inputs) {
    if (inputs == null || inputs.length < 2) {
      throw new KsqlFunctionException("Function Concat_WS expects at least two input arguments.");
    }

    final String separator = inputs[0];
    if (separator == null) {
      return null;
    }

    return Arrays.stream(inputs, 1,
        inputs.length)
        .filter(Objects::nonNull)
        .collect(Collectors.joining(separator));
  }
@Test
  public void shouldFailIfOnlySeparatorStringInput() {
    // When:
    final KsqlException e = assertThrows(KsqlFunctionException.class, () -> udf.concatWS("SEP"));

    // Then:
    assertThat(e.getMessage(), containsString("expects at least two input arguments"));
  }