@Test
    public void testIterator() {
        final int targetSize = 100;
        final ArraySet<Integer> t = new ArraySet<>(0);
        final Integer[] instances = new Integer[targetSize];
        final List<Integer> remove = buildSubSet(targetSize, t, instances);
        int traversed = 0;
        for (Iterator<Integer> i = t.iterator(); i.hasNext();) {
            Integer n = i.next();
            if (remove.contains(n)) {
                i.remove();
            }
            ++traversed;
        }
        assertEquals(targetSize, traversed);
        assertEquals(targetSize / 2, t.size());
        for (int i = 0; i < instances.length; ++i) {
            Integer n = instances[i];
            if (remove.contains(n)) {
                assertFalse(t.contains(n));
            } else {
                assertTrue(t.contains(n));
            }
        }
    }
Check ArraySet seems to work. :)

@author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a>
vespajlib/src/test/java/com/yahoo/collections/ArraySetTestCase.java