@Udf
  public Long trunc(@UdfParameter final Long val) {
    return val;
  }
@Test
  public void shouldTruncateSimpleDoublePositive() {
    assertThat(udf.trunc(0.0d), is(0L));
    assertThat(udf.trunc(1.23d), is(1L));
    assertThat(udf.trunc(1.0d), is(1L));
    assertThat(udf.trunc(1.5d), is(1L));
    assertThat(udf.trunc(1.75d), is(1L));
    assertThat(udf.trunc(1.53e6d), is(1530000L));
    assertThat(udf.trunc(10.01d), is(10L));
    assertThat(udf.trunc(12345.5d), is(12345L));
    assertThat(udf.trunc(9.99d), is(9L));
    assertThat(udf.trunc(110.1), is(110L));
    assertThat(udf.trunc(1530000.01d), is(1530000L));
    assertThat(udf.trunc(9999999.99d), is(9999999L));
  }