final byte[] DATA_REPLACE = biggerCompressibleData(190 * 1000).getBytes("UTF-8");
final byte[] CUSTOM_METADATA_REPLACE = new byte[] { 'd', 'e' };
try {
StorableCreationMetadata metadata = new StorableCreationMetadata(null,
calcChecksum32(DATA_ORIG), HashConstants.NO_CHECKSUM);
metadata.uncompressedSize = -1L;
StorableCreationResult resp = store.insert(StoreOperationSource.REQUEST, null,
KEY1, new ByteArrayInputStream(DATA_ORIG),
metadata, ByteContainer.simple(CUSTOM_METADATA_ORIG));
assertTrue(resp.succeeded());
assertNull(resp.getPreviousEntry());
_verifyCounts(1L, store);
// Then try to overwrite with a newer timestamp
timeMaster.advanceCurrentTimeMillis(1000);
StorableCreationMetadata metadata2 = new StorableCreationMetadata(null,
calcChecksum32(DATA_REPLACE), HashConstants.NO_CHECKSUM);
metadata.uncompressedSize = -1L;
resp = store.upsertConditionally(StoreOperationSource.REQUEST, null,
KEY1, new ByteArrayInputStream(DATA_REPLACE),
metadata2, ByteContainer.simple(CUSTOM_METADATA_REPLACE),