Object expectedValue = key;
if (key.equals(migratedKey)) {
expectedValue = "someValue";
}
// check them directly in data container
InternalCacheEntry d0 = advancedCache(0).getDataContainer().get(key);
InternalCacheEntry d1 = advancedCache(1).getDataContainer().get(key);
InternalCacheEntry d2 = advancedCache(2).getDataContainer().get(key);
int c = 0;
if (d0 != null && !d0.isExpired()) {
assertEquals(expectedValue, d0.getValue());
c++;
}
if (d1 != null && !d1.isExpired()) {
assertEquals(expectedValue, d1.getValue());
c++;
}
if (d2 != null && !d2.isExpired()) {
assertEquals(expectedValue, d2.getValue());
c++;
}
assertEquals(1, c);
// look at them also via cache API