[Aggregator] Add tests and fix error on merge