@Override
    public LongCursor cursor() {
        assert hsa.address() >= 0 : "cursor() called on a disposed map";
        return new Cursor();
    }
@Test
    public void testCursor() {
        assertFalse(set.cursor().advance());

        Set<Long> expected = new HashSet<>();
        for (int i = 1; i <= 1000; i++) {
            set.add(i);
            expected.add((long) i);
        }

        LongCursor cursor = set.cursor();
        while (cursor.advance()) {
            long key = cursor.value();
            assertTrue("Key: " + key, expected.remove(key));
        }
    }