@Udf
  public final <T> T nullIf(
          @UdfParameter(description = "expression 1") final T expr1,
          @UdfParameter(description = "expression 2") final T expr2
  ) {
    if (expr1 == null) {
      return null;
    }
    if (expr1.equals(expr2)) {
      return null;
    } else {
      return expr1;
    }
  }
@Test
  public void shouldReturnNullIfBothValuesAreNulls() {
    assertThat(udf.nullIf(null, null), is(nullValue()));
  }