### Question:
Flake64L extends Flake64<Long> { @Override public Long nextId() { final SequenceNumber sequenceNumber = getSequence().nextSequenceNumber(); final ByteBuffer bb = (ByteBuffer) toByteBuffer(sequenceNumber); return encoder.encode(bb); } Flake64L(final TimeProvider timeProvider,
                    final WorkerIdProvider workerIdProvider);  Flake64L(final TimeProvider timeProvider,
                    final WorkerIdProvider workerIdProvider,
                    final Encoder<ByteBuffer, Long> encoder); @Override Long nextId();  }### Answer:
@Test public void generatedIdsShouldBeLinearlyIncreasingAcrossTimeSlots() { List<Long> generatedIds = new ArrayList<>(); long started = System.nanoTime(); while (System.nanoTime() - started < 200_000_000L) { generatedIds.add(flake.nextId()); } assertFalse(generatedIds.isEmpty()); assertThatListIsStrictlyOrdered(generatedIds); }
@Test public void idsThatHaveBeenGeneratedASecondApartAlsoAreASecondApartInIdSpace() throws InterruptedException { Long id1 = flake.nextId(); Wait.delay(1, TimeUnit.SECONDS); Long id2 = flake.nextId(); long timestampFromId1 = id1 >> 22; long timestampFromId2 = id2 >> 22; long timeBetween = timestampFromId2 - timestampFromId1; assertTrue(timeBetween > 900L && timeBetween < 1_800L); }