@@ -0,0 +1,1454 @@
+package com.mysema.query.collections;%0A%0Aimport static com.mysema.query.group.GroupBy.groupBy;%0Aimport static com.mysema.query.group.GroupBy.map;%0Aimport static org.junit.Assert.assertEquals;%0A%0Aimport java.util.List;%0Aimport java.util.Map;%0A%0Aimport org.junit.Test;%0A%0Aimport com.google.common.collect.ImmutableSet;%0Aimport com.google.common.collect.Lists;%0Aimport com.mysema.query.annotations.QueryEntity;%0A%0A%0Apublic class GroupBy4Test %7B%0A%0A    @QueryEntity%0A    public static class Table %7B%0A        String col1, col2, col3;%0A%0A        public Table(String c1, String c2, String c3) %7B%0A            col1 = c1;%0A            col2 = c2;%0A            col3 = c3;%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void test() %7B%0A        List%3CTable%3E data = Lists.newArrayList();%0A        data.add(new Table(%221%22, %22abc%22, %22111%22));%0A        data.add(new Table(%221%22, %22pqr%22, %22222%22));%0A        data.add(new Table(%222%22, %22abc%22, %22333%22));%0A        data.add(new Table(%222%22, %22pqr%22, %22444%22));%0A        data.add(new Table(%223%22, %22abc%22, %22555%22));%0A        data.add(new Table(%223%22, %22pqr%22, %22666%22));%0A%0A        QGroupBy4Test_Table table = QGroupBy4Test_Table.table;%0A        Map%3CString, Map%3CString, String%3E%3E grouped = CollQueryFactory%0A                .from(table, data)%0A                .transform(groupBy(table.col1).as(map(table.col2, table.col3)));%0A%0A        assertEquals(3, grouped.size());%0A        assertEquals(2, grouped.get(%221%22).size());%0A        assertEquals(ImmutableSet.of(%22abc%22, %22pqr%22),  grouped.get(%221%22).keySet());%0A%0A    %7D%0A%0A%7D%0A

Add test