long[] data = {0, 42, 5, 2, 6, 1, 7};
LongSortedSet set = new LongSortedArraySet(data);
LongBidirectionalIterator iter = set.iterator(2);
assertTrue(iter.hasNext());
assertTrue(iter.hasPrevious());
assertEquals(5, iter.nextLong());
iter = set.iterator(2);
assertEquals(2, iter.previousLong());
iter = set.iterator(-5);
assertFalse(iter.hasPrevious());
iter = set.iterator(100);