Test coverage for Query->groupBy()