@Udf
  public <T extends Comparable<? super T>> T arrayMin(@UdfParameter(
      description = "Array of values from which to find the minimum") final List<T> input) {
    if (input == null) {
      return null;
    }

    T candidate = null;
    for (T thisVal : input) {
      if (thisVal != null) {
        if (candidate == null) {
          candidate = thisVal;
        } else if (thisVal.compareTo(candidate) < 0) {
          candidate = thisVal;
        }
      }
    }
    return candidate;
  }
@Test
  public void shouldFindStringMin() {
    final List<String> input = Arrays.asList("foo", "food", "bar");
    assertThat(udf.arrayMin(input), is("bar"));
  }