### Question:
LongSortedArraySet extends AbstractLongSortedSet implements Serializable { @Override public LongBidirectionalIterator iterator() { return keys.keyIterator(); } LongSortedArraySet(@Nonnull SortedKeyIndex ks);  LongSortedArraySet(@Nonnull Collection<Long> items);  LongSortedArraySet(long[] items); SortedKeyIndex getIndex(); @Deprecated SortedKeyIndex getDomain(); @Override LongComparator comparator(); @Override long firstLong(); @Override long lastLong(); @Override LongBidirectionalIterator iterator(); @Override LongBidirectionalIterator iterator(long key); @Override LongSortedSet subSet(long startKey, long endKey); @Override LongSortedSet headSet(long key); @Override LongSortedSet tailSet(long key); @Override int size(); @Override boolean contains(long key); LongSortedSet randomSubset(Random rng, int n, LongSet... exclude);  }### Answer:
@Test public void testArrayCtor() { LongSortedSet set = new LongSortedArraySet(new long[]{2, 5, 6}); testSetSimple(set); LongBidirectionalIterator iter = set.iterator(); assertTrue(iter.hasNext()); assertEquals(2, iter.nextLong()); assertTrue(iter.hasPrevious()); assertEquals(2, iter.previousLong()); assertFalse(iter.hasPrevious()); }
@Test public void testTailIter() { 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); assertFalse(iter.hasNext()); iter = set.iterator(3); assertEquals(5, iter.nextLong()); iter = set.iterator(3); assertEquals(2, iter.previousLong()); }