@Udf
  public Long trunc(@UdfParameter final Long val) {
    return val;
  }
@Test
  public void shouldHandleDoubleLiteralsEndingWith5ThatCannotBeRepresentedExactlyAsDoubles() {
    assertThat(udf.trunc(new BigDecimal("265.335"), 2), is(new BigDecimal("265.330")));
    assertThat(udf.trunc(new BigDecimal("-265.335"), 2), is(new BigDecimal("-265.330")));

    assertThat(udf.trunc(new BigDecimal("265.365"), 2), is(new BigDecimal("265.360")));
    assertThat(udf.trunc(new BigDecimal("-265.365"), 2), is(new BigDecimal("-265.360")));
  }