HybridTimestamp implements Comparable<HybridTimestamp>, SerializableComparable<BigInteger> { public long timestamp() { return (logicalTime >> 16 << 16) | (logicalCounter << 48 >> 48); } HybridTimestamp();  HybridTimestamp(PhysicalTimeProvider physicalTimeProvider);  HybridTimestamp(PhysicalTimeProvider physicalTimeProvider, long timestamp);  HybridTimestamp(PhysicalTimeProvider physicalTimeProvider, long logicalTime, long logicalCounter);  HybridTimestamp(PhysicalTimeProvider physicalTimeProvider, HybridTimestamp ts); @LayoutConstructor  HybridTimestamp(long logicalTime, long logicalCounter); HybridTimestamp clone(); @Override int compareTo(HybridTimestamp o); static int compare(long time1, long time2); @Override boolean equals(Object obj); static int compare(TimeStamp t1, TimeStamp t2); long update(); long update(HybridTimestamp ts); long update(long eventLogicalTime, long eventLogicalCounter); long timestamp(); String toString(); @Override BigInteger getSerializableComparable();  }
@Test public void testTimestamp() { HybridTimestamp timestamp = new HybridTimestamp(physicalTimeProvider); timestamp.update(); timestamp.update(); assertTrue(timestamp.getLogicalCounter() > 0); HybridTimestamp timestamp1 = new HybridTimestamp(physicalTimeProvider, timestamp.getLogicalTime(), timestamp.getLogicalCounter()); assertEquals(timestamp1.getLogicalCounter(), timestamp.getLogicalCounter()); }