test case for aggregation