@Udf
  public <T extends Comparable<? super T>> List<T> arraySortDefault(@UdfParameter(
      description = "The array to sort") final List<T> input) {
    return arraySortWithDirection(input, "ASC");
  }
@Test
  public void shouldSortNullsToEnd() {
    final List<String> input = Arrays.asList(null, "foo", null, "bar", null);
    final List<String> output = udf.arraySortDefault(input);
    assertThat(output, contains("bar", "foo", null, null, null));
  }