Value extends Expirable { public Object getValue() { return value; } Value();  Value(Object version, long timestamp, Object value); @Override @SuppressWarnings("unchecked") boolean isReplaceableBy(long txTimestamp, Object newVersion, Comparator versionComparator); long getTimestamp(); Object getValue(); @Override Object getValue(long txTimestamp); @Override boolean matches(ExpiryMarker lock); @Override ExpiryMarker markForExpiration(long timeout, String nextMarkerId); @Override void readData(ObjectDataInput in); @Override void writeData(ObjectDataOutput out); @Override int getFactoryId(); @Override int getId();  }
@Test public void testGetValue() throws Exception { String expectedValue = "Some value"; Value value = new Value(null, 100L, expectedValue); assertEquals(expectedValue, value.getValue()); }
@Test public void testGetValueWithTimestampBefore() throws Exception { String expectedValue = "Some value"; Value value = new Value(null, 100L, expectedValue); assertNull(value.getValue(99L)); }
@Test public void testGetValueWithTimestampEqual() throws Exception { String expectedValue = "Some value"; Value value = new Value(null, 100L, expectedValue); assertEquals(expectedValue, value.getValue(100L)); }
@Test public void testGetValueWithTimestampAfter() throws Exception { String expectedValue = "Some value"; Value value = new Value(null, 100L, expectedValue); assertEquals(expectedValue, value.getValue(101L)); }