Versioned { public synchronized <U> Versioned<U> map(final Function<V, U> transformer) { return new Versioned<>(value != null ? transformer.apply(value) : null, version, creationTime); } Versioned(final V value, final long version, final long creationTime);  Versioned(final V value, final long version); V value(); long version(); long creationTime(); synchronized Versioned<U> map(final Function<V, U> transformer); static U valueOrElse(final Versioned<U> versioned, final U defaultValue); static U valueOrNull(final Versioned<U> versioned); @Override int hashCode(); @Override boolean equals(final Object other); @Override String toString();  }
@Test public void testMap() { final Versioned<String> tempObj = stats1.map(VersionedTest::transform); assertThat(tempObj.value(), is("1")); }