@Udf
  public Long trunc(@UdfParameter final Long val) {
    return val;
  }
@Test
  public void shouldTruncateSimpleBigDecimalNegative() {
    assertThat(udf.trunc(new BigDecimal("-1.23")), is(new BigDecimal("-1")));
    assertThat(udf.trunc(new BigDecimal("-1.0")), is(new BigDecimal("-1")));
    assertThat(udf.trunc(new BigDecimal("-1.5")), is(new BigDecimal("-1")));
    assertThat(udf.trunc(new BigDecimal("-1530000")), is(new BigDecimal("-1530000")));
    assertThat(udf.trunc(new BigDecimal("-10.1")), is(new BigDecimal("-10")));
    assertThat(udf.trunc(new BigDecimal("-12345.5")), is(new BigDecimal("-12345")));
    assertThat(udf.trunc(new BigDecimal("-9.99")), is(new BigDecimal("-9")));
    assertThat(udf.trunc(new BigDecimal("-110.1")), is(new BigDecimal("-110")));
    assertThat(udf.trunc(new BigDecimal("-1530000.01")), is(new BigDecimal("-1530000")));
    assertThat(udf.trunc(new BigDecimal("-9999999.99")), is(new BigDecimal("-9999999")));
  }