@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 shouldConcatBytes() {
    assertThat(udf.concatWS(ByteBuffer.wrap(new byte[] {1}), ByteBuffer.wrap(new byte[] {2}), ByteBuffer.wrap(new byte[] {3})),
        is(ByteBuffer.wrap(new byte[] {2, 1, 3})));
  }