cache.invoke(1, new SimpleBackupAwareEntryProcessor());
final Data key = serializationService.toData(1);
final int partitionId = hz1.getPartitionService().getPartition(1).getPartitionId();
final ICacheRecordStore recordStore1 = cacheServiceHz1.getOrCreateCache("/hz/" + cacheName, partitionId);
final ICacheRecordStore recordStore2 = cacheServiceHz2.getOrCreateCache("/hz/" + cacheName, partitionId);
assertTrueEventually(new AssertTask() {
@Override
public void run()
throws Exception {
CacheRecord record1 = recordStore1.getRecord(key);
CacheRecord record2 = recordStore2.getRecord(key);
Object value1 = serializationService.toObject(record1.getValue());
Object value2 = serializationService.toObject(record2.getValue());
assertEquals("Foo", value1);