Unit tests for the various aggregation functions