@Override
    public @NotNull Iterator<Integer> iterator() {
        return new HashSetIterator<Integer>() {
            @Override
            public Integer next() {
                return nextEntry().key;
            }
        };
    }
@Test
    public void iterator() {
        final Set<Integer> tested = new IntHashSet();
        final Set<Integer> set = new java.util.HashSet<>();

        for (int i = 0; i < 10000; ++i) {
            tested.add(i);
            set.add(i);
        }
        for (Integer key : tested) {
            Assert.assertTrue(set.remove(key));
        }
        Assert.assertEquals(0, set.size());
    }