add a unit test for the post aggregation functionality