groupBy tests