Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/tests/java/util/TreeSetTest.java
package tests.java.util;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import java.util.TreeSet;

public class TreeSetTest {

    TreeSet<String> set;
    
    @Test
    public void test() {
        set = new TreeSet<>();
        set.add("b");
        set.add("a");
        assertEquals("a", set.pollFirst());
        assertEquals("b", set.pollFirst());
        
        set = new TreeSet<>();
        set.add("a");
        set.add("b");
        assertEquals("a", set.pollFirst());
        assertEquals("b", set.pollFirst());
    }
}
-------------------------------------------------------------------------------
Test set: tests.java.util.TreeSetTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in tests.java.util.TreeSetTest
test  Time elapsed: 0 s