@Udf
  public <T> List<T> remove(
      @UdfParameter(description = "Array of values") final List<T> array,
      @UdfParameter(description = "Value to remove") final T victim) {
    if (array == null) {
      return null;
    }

    return array.stream()
        .filter(el -> !Objects.equals(el, victim))
        .collect(Collectors.toList());
  }
@Test
  public void shouldReturnNullForNullInputArray() {
    final List<String> input1 = null;
    final String input2 = "foo";
    final List<String> result = udf.remove(input1, input2);
    assertThat(result, is(nullValue()));
  }