@Test
    public void testWindowSpecifications() {
        assertEquals(
            asList(
                tuple(0, 0, 0, 0, 4),
                tuple(1, 0, 1, 1, 2),
                tuple(2, 1, 0, 4, 0),
                tuple(3, 2, 2, 2, 3),
                tuple(4, 1, 1, 3, 1)
            ),
            Seq.of(1, 2, 4, 2, 3)
               .window(
                    Window.of(),
                    Window.of(i -> i % 2),
                    Window.of(i -> i < 3),
                    Window.of(naturalOrder()),
                    Window.of(reverseOrder())
                )
                .map(t -> tuple(
                    (int) t.v1.rowNumber(),
                    (int) t.v2.rowNumber(),
                    (int) t.v3.rowNumber(),
                    (int) t.v4.rowNumber(),
                    (int) t.v5.rowNumber()
                ))
                .toList()
        );
    }
@author Lukas Eder
@author Roman Tkalenko
jOOL/src/test/java/org/jooq/lambda/SeqTest.java