Version implements Timestamp { public Version(final long version) { this.version = version; } Version(final long version); long value(); @Override int compareTo(final Timestamp o); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test public void testVersion() { final Version version1 = new Version(1); final Version version2 = new Version(1); assertTrue(version1.equals(version2)); assertTrue(version1.hashCode() == version2.hashCode()); assertTrue(version1.value() == version2.value()); final Version version3 = new Version(2); assertFalse(version1.equals(version3)); assertFalse(version1.hashCode() == version3.hashCode()); assertFalse(version1.value() == version3.value()); }