@UdafFactory(description = "collect distinct values of a Bigint field into a single Array")
  public static <T> Udaf<T, List<T>, List<T>> createCollectSetT() {
    return new Collect<>();
  }
@Test
  public void shouldCollectDistinctBytes() {
    final Udaf<ByteBuffer, List<ByteBuffer>, List<ByteBuffer>> udaf = CollectSetUdaf.createCollectSetT();
    final ByteBuffer[] values = new ByteBuffer[] {ByteBuffer.wrap(new byte[] {1}), ByteBuffer.wrap(new byte[] {2})};
    List<ByteBuffer> runningList = udaf.initialize();
    for (final ByteBuffer i : values) {
      runningList = udaf.aggregate(i, runningList);
    }
    assertThat(runningList, contains(ByteBuffer.wrap(new byte[] {1}), ByteBuffer.wrap(new byte[] {2})));
  }