@Test
    public void testSum() {
        assertEquals(Optional.empty(), Seq.of().sum());
        
        assertEquals(Optional.of(1), Seq.of(1).sum());
        assertEquals(Optional.of(3), Seq.of(1, 2).sum());
        assertEquals(Optional.of(6), Seq.of(1, 2, 3).sum());
        
        assertEquals(Optional.of(1.0), Seq.of(1.0).sum());
        assertEquals(Optional.of(3.0), Seq.of(1.0, 2.0).sum());
        assertEquals(Optional.of(6.0), Seq.of(1.0, 2.0, 3.0).sum());
    }
@author Lukas Eder
@author Roman Tkalenko
jOOL/src/test/java/org/jooq/lambda/SeqTest.java