@Override
    public Long next(Object ignored) {
        if (!limitedDomain) {
            return next0();
        }
        return domain
            .stream()
            .skip(random.nextInt(domain.size()))
            .findFirst()
            .orElseThrow(() -> new RuntimeException("Should never happen"));
    }
@Test
    public void testSequence() {
        SequenceGenerator generator =
            new SequenceGenerator.Builder()
                .setMin(1L)
                .setMax(100L)
                .build();

        for (int i = 0; i < 10; i++) {
            assertEquals(i + 1, generator.next(null).intValue());
        }
    }