@Override
    public UUID generateId() {
        long counterValue = counter.incrementAndGet();
        if (counterValue == MAX_COUNTER_VALUE) {
            throw new CucumberException(
                "Out of " + IncrementingUuidGenerator.class.getSimpleName() +
                        " capacity. Please generate using a new instance or use another " +
                        UuidGenerator.class.getSimpleName() + "implementation.");
        }
        long leastSigBits = counterValue | 0x8000000000000000L; // set variant
        return new UUID(msb, leastSigBits);
    }
@Test
    void generates_different_non_null_uuids() {
        // Given
        UuidGenerator generator = new IncrementingUuidGenerator();

        // When
        List<UUID> uuids = IntStream.rangeClosed(1, 10)
                .mapToObj(i -> generator.generateId())
                .collect(Collectors.toList());

        // Then
        checkUuidProperties(uuids);
    }