@Test
public void sendPhysicalTimeInTheFuture() {

  final int[] calls = {0};
  final DefaultVersionService.Clock clock = () -> {
    if (calls[0]++ == 0) {
      return (System.currentTimeMillis() * 1000L);
    }
    return (System.currentTimeMillis() * 1000L) + DefaultVersionService.MAX_SYSTEM_TIME_FORWARD_DRIFT + 1;
  };
  DefaultVersionService v = new DefaultVersionService(clock);
  final DefaultVersionService.HybridLogicalTimestamp send = v.nextVersion();
  final DefaultVersionService.HybridLogicalTimestamp send1 = v.nextVersion();
  // when our physical clock is too far ahead, only the counter moves forward
  assertEquals(send.logicalTime(), send1.logicalTime());
  assertTrue(send.counter() < send1.counter());
  assertSame(send.counter(), send1.counter() - 1);
}