@Test
    public void testGroupByAndMax() {
        Map<String, Optional<Integer>> map = 
        Seq.of(
            tuple("A", 1),
            tuple("B", 2),
            tuple("C", 3),
            tuple("A", 4),
            tuple("A", 5),
            tuple("C", 6))
           .groupBy(t -> t.v1, Agg.max(t -> t.v2));
        
        assertEquals(3, map.size());
        assertEquals(5, (int) map.get("A").get());
        assertEquals(2, (int) map.get("B").get());
        assertEquals(6, (int) map.get("C").get());
    }
@author Lukas Eder
@author Roman Tkalenko
jOOL/src/test/java/org/jooq/lambda/SeqTest.java