Added unit test for aggregation