Refactoring GroupingAndPartitioningTest.java