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