version.compareTo(cacheEntry.getVersion()));
}
public void testConditionalReplaceWithVersion() {
final Integer key = 2;
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(InequalVersionComparisonResult.EQUAL,
newVersion.compareTo(cacheEntry.getVersion()));
}