@Test
    public void testSorted() {
        Seq<Tuple2<Integer, String>> t1 = Seq.of(tuple(2, "two"), tuple(1, "one"));
        List<Tuple2<Integer, String>> s1 = t1.sorted().toList();
        assertEquals(tuple(1, "one"), s1.get(0));
        assertEquals(tuple(2, "two"), s1.get(1));

        Seq<Tuple2<Integer, String>> t2 = Seq.of(tuple(2, "two"), tuple(1, "one"));
        List<Tuple2<Integer, String>> s2 = t2.sorted(comparing(t -> t.v1())).toList();
        assertEquals(tuple(1, "one"), s2.get(0));
        assertEquals(tuple(2, "two"), s2.get(1));

        Seq<Tuple2<Integer, String>> t3 = Seq.of(tuple(2, "two"), tuple(1, "one"));
        List<Tuple2<Integer, String>> s3 = t3.sorted(t -> t.v1()).toList();
        assertEquals(tuple(1, "one"), s3.get(0));
        assertEquals(tuple(2, "two"), s3.get(1));
    }
@author Lukas Eder
@author Roman Tkalenko
jOOL-java-8/src/test/java/org/jooq/lambda/SeqTest.java