NumericVersion version = new NumericVersion(1);
advCache.put(key, "v1", new EmbeddedMetadata.Builder().version(version).build());
NumericVersion newVersion = new NumericVersion(2);
advCache.replace(key, "v1", "v2", withVersion(newVersion));
CacheEntry cacheEntry = advCache.getCacheEntry(key);
assertEquals(EQUAL, newVersion.compareTo(cacheEntry.getMetadata().version()));
}
public void testPutIfAbsentWithVersion() {
final Integer key = 3;
NumericVersion version = new NumericVersion(1);