hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java [219:249]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Random random = new Random();
        Set<Long> numbers = new HashSet<>();
        Set<UUID> uuids = new HashSet<>();
        Set<String> strings = new HashSet<>();
        for (CollectionType type : CollectionType.values()) {
            idSet = new IdSet(type);
            for (int i = 1; i < SIZE; i++) {
                long number = random.nextLong();
                numbers.add(number);
                idSet.add(IdGenerator.of(number));
            }
            for (int i = 0; i < SIZE; i++) {
                UUID uuid = UUID.randomUUID();
                uuids.add(uuid);
                idSet.add(IdGenerator.of(uuid));
            }
            for (int i = 0; i < SIZE; i++) {
                String string = RandomStringUtils.randomAlphanumeric(10);
                strings.add(string);
                idSet.add(IdGenerator.of(string));
            }
            Assert.assertEquals(numbers.size() + uuids.size() + strings.size(),
                                idSet.size());

            LongHashSet numberIds = Whitebox.getInternalState(idSet,
                                                              "numberIds");
            Assert.assertEquals(numbers.size(), numberIds.size());
            Set<Id> nonNumberIds = Whitebox.getInternalState(idSet,
                                                             "nonNumberIds");
            Assert.assertEquals(uuids.size() + strings.size(),
                                nonNumberIds.size());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



hugegraph-test/src/main/java/org/apache/hugegraph/unit/util/collection/IdSetTest.java [274:304]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        Random random = new Random();
        Set<Long> numbers = new HashSet<>();
        Set<UUID> uuids = new HashSet<>();
        Set<String> strings = new HashSet<>();
        for (CollectionType type : CollectionType.values()) {
            idSet = new IdSet(type);
            for (int i = 1; i < SIZE; i++) {
                long number = random.nextLong();
                numbers.add(number);
                idSet.add(IdGenerator.of(number));
            }
            for (int i = 0; i < SIZE; i++) {
                UUID uuid = UUID.randomUUID();
                uuids.add(uuid);
                idSet.add(IdGenerator.of(uuid));
            }
            for (int i = 0; i < SIZE; i++) {
                String string = RandomStringUtils.randomAlphanumeric(10);
                strings.add(string);
                idSet.add(IdGenerator.of(string));
            }
            Assert.assertEquals(numbers.size() + uuids.size() + strings.size(),
                                idSet.size());

            LongHashSet numberIds = Whitebox.getInternalState(idSet,
                                                              "numberIds");
            Assert.assertEquals(numbers.size(), numberIds.size());
            Set<Id> nonNumberIds = Whitebox.getInternalState(idSet,
                                                             "nonNumberIds");
            Assert.assertEquals(uuids.size() + strings.size(),
                                nonNumberIds.size());
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



