For completeness, add test cases that optimize multi-expression and multi-column GROUP BY clauses matching full index keys and prefix keys (like first 2 out of 3) and cases that fail to optimize group by non-prefix column(s) of a compound index  (like first and third out of 3).
Also, optimize and test permutations of full index keys or prefix keys (GROUP BY B, A and GROUP BY C,B,A with an index on A, B, C).