@UdafFactory(description = "collect values of a field into a single Array")
  public static <T> TableUdaf<T, List<T>, List<T>> createCollectListT() {
    return new Collect<>();
  }
@Test
  public void shouldUndo() {
    final TableUdaf<Integer, List<Integer>, List<Integer>> udaf = CollectListUdaf.createCollectListT();
    final Integer[] values = new Integer[] {3, 4, 5, 3};
    List<Integer> runningList = udaf.initialize();
    for (final Integer i : values) {
      runningList = udaf.aggregate(i, runningList);
    }
    runningList = udaf.undo(4, runningList);
    assertThat(runningList, contains(3, 5, 3));
    runningList = udaf.undo(3, runningList);
    assertThat(runningList, contains(3, 5));
  }