ColtHashSet extends AbstractSet<Long> implements SnapshotableSet<Long> { @Override public Iterator<Long> iterator() { return new Iter(); } ColtHashSet(int initialCapacity, double minLoadFactor, double maxLoadFactor);  ColtHashSet(int initialCapacity); @Override synchronized boolean add(Long aLong); @Override Iterator<Long> iterator(); @Override synchronized int size(); @Override SnapshotableSet<Long> makeSnapshot(); @Override SnapshotableSet<Long> makeTransientSnapshot();  }
@Test(groups = "fast") public void testIterator() throws Exception { set.add(1L); set.add(2L); set.add(3L); Iterator<Long> iterator = set.iterator(); Assert.assertTrue(iterator.hasNext()); Assert.assertEquals(iterator.next().longValue(), 3L); Assert.assertTrue(iterator.hasNext()); Assert.assertEquals(iterator.next().longValue(), 2L); Assert.assertTrue(iterator.hasNext()); Assert.assertEquals(iterator.next().longValue(), 1L); Assert.assertFalse(iterator.hasNext()); }