@UdafFactory(description = "Build a value-to-count histogram of input Strings")
  public static TableUdaf<String, Map<String, Long>, Map<String, Long>> histogramString() {
    return histogram();
  }
@Test
  public void shouldNotExceedSizeLimit() {
    final TableUdaf<String, Map<String, Long>, Map<String, Long>> udaf = HistogramUdaf.histogramString();
    Map<String, Long> agg = udaf.initialize();
    for (int thisValue = 1; thisValue < 2500; thisValue++) {
      agg = udaf.aggregate(String.valueOf(thisValue), agg);
    }
    assertThat(agg.entrySet(), hasSize(1000));
    assertThat(agg, hasEntry("1", 1L));
    assertThat(agg, hasEntry("1000", 1L));
    assertThat(agg, not(hasEntry("1001", 1L)));
  }