@Test
public void testLast() {

  FoldedTreeSet<Integer> tree = new FoldedTreeSet<>();
  for (int i = 0; i < 256; i++) {
    tree.add(1024 + i);
    assertEquals(1024 + i, tree.last().intValue());
  }
  for (int i = 0; i < 255; i++) {
    tree.remove(1024 + i);
    assertEquals(1279, tree.last().intValue());
  }
}