@Udf
  public <T> String toJsonString(@UdfParameter final T input) {
    return toJson(input);
  }
@Test
  public void shouldSerializeArray() {
    // When:
    final String result = udf.toJsonString(Arrays.asList(1, 2, 3));

    // Then:
    assertEquals("[1,2,3]", result);
  }