Add AggregatorTest; Fix bug in Aggregator