@Test
    public void testGrow() {
        final TinyIdentitySet<Integer> t = new TinyIdentitySet<>(5);
        final int targetSize = 100;
        for (int i = 0; i < targetSize; ++i) {
            t.add(i);
        }
        assertEquals(targetSize, t.size());
        int n = 0;
        for (final Iterator<Integer> i = t.iterator(); i.hasNext();) {
            assertEquals(Integer.valueOf(n++), i.next());
        }
        assertEquals(targetSize, n);
    }
Check TinyIdentitySet seems to work. :)

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