Description
I would expect code below to return {1, 2, 3}. Instead, it returns {2, 3}.
public class MaxNAggregatorTest { @Test public void duplicateMaxNValueShouldBeIgnored() { Aggregator<Integer> myAggregator = Aggregators.MAX_N(3, Integer.class); myAggregator.reset(); myAggregator.update(1); myAggregator.update(2); myAggregator.update(3); myAggregator.update(3); assertEquals(3, Iterables.size(myAggregator.results())); } }