@Test
    public void testEmptySet() {
        final int targetSize = 100;
        final ArraySet<Integer> t = new ArraySet<>(0);
        final Integer[] instances = new Integer[targetSize];
        final List<Integer> add = buildSubSet(targetSize, t, instances);
        for (Integer i : instances) {
            t.remove(i);
        }
        assertEquals(0, t.size());
        for (Integer i : add) {
            t.add(i);
        }
        assertEquals(targetSize / 2, t.size());
    }
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