group by test case