### Question:
DefaultRangedLongSet implements RangedLongSet { @Override public Iterator<Long> iterator() { return new LongIterableIterator(getBlocks()); } DefaultRangedLongSet();  DefaultRangedLongSet(Collection<Long> values);  DefaultRangedLongSet(DefaultRangedLongSet other);  DefaultRangedLongSet(long singularValue);  DefaultRangedLongSet(long[] values);  DefaultRangedLongSet(Long[] values);  DefaultRangedLongSet(RangeLongBlock block); @Override boolean add(long value); @Override boolean add(Long value); @Override boolean add(RangedLongSet otherSet); @Override boolean addAll(Collection<? extends Long> values); @Override boolean addAll(long[] values); @Override boolean addAll(Long[] values); @Override boolean addBlock(RangeLongBlock insertBlock); @Override boolean addBlocks(Collection<RangeLongBlock> blocksToAdd); @Override int blockCount(); @Override void clear(); @Override boolean contains(Long value); @Override boolean contains(Object value); @Override boolean containsAll(Collection<?> c); @Override boolean equals(Object obj); @Override List<RangeLongBlock> getBlocks(); @Override RangedLongSet getDifference(long[] values); @Override RangedLongSet getDifference(RangedLongSet other); @Override RangedLongSet getIntersection(Collection<Long> values); @Override RangedLongSet getIntersection(long[] values); @Override RangedLongSet getIntersection(Long[] values); @Override RangedLongSet getIntersection(RangedLongSet otherSet); @Override RangedLongSet getIntersection(RangeLongBlock blockToIntersect); @Override Long getMaximum(); @Override Long getMinimum(); @Override RangedLongSet getUnion(RangedLongSet other); @Override long[] getValues(); @Override int hashCode(); @Override boolean hasValue(long value); @Override boolean intersects(RangeLongBlock block); @Override boolean isEmpty(); @Override Iterator<Long> iterator(); @Override boolean remove(Collection<? extends Long> valueList); @Override boolean remove(long value); @Override boolean remove(Long value); @Override boolean remove(long[] values); @Override boolean remove(Long[] values); @Override boolean remove(Object o); @Override boolean remove(RangedLongSet otherSet); @Override boolean removeAll(Collection<?> stuff); @Override boolean removeBlock(RangeLongBlock blockToRemove); @Override boolean removeBlocks(Collection<RangeLongBlock> blocksToRemove); @Override boolean retainAll(Collection<?> stuff); @Override int size(); @Override Object[] toArray(); @SuppressWarnings("unchecked") @Override T[] toArray(T[] arg0); @Override String toString(); @Override long valueCount();  }### Answer:
@Test public void testIterator() { long[] set = { 1, 2, 3, 5, 6, 7, 9, 10, 11 }; DefaultRangedLongSet rls = new DefaultRangedLongSet(set); Iterator<Long> itr = rls.iterator(); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(1, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(2, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(3, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(5, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(6, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(7, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(9, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(10, itr.next().longValue()); Assert.assertTrue(itr.hasNext()); Assert.assertEquals(11, itr.next().longValue()); Assert.assertTrue(!itr.hasNext()); TestHelper.testNoSuchElement(itr); TestHelper.testUnsupportedRemove(itr); }