public void testGetFromNonOwnerWithFlags() throws Exception {
String key = "k2", value = "value2";
for (Cache<Object, String> c : caches) assert c.isEmpty();
Cache<Object, String> nonOwner = getFirstNonOwner(key);
Cache<Object, String> owner = getFirstOwner(key);
CacheStore ownerStore = TestingUtil.extractComponent(owner, CacheLoaderManager.class).getCacheStore();
owner.put(key, value);
assert value.equals(ownerStore.load(key).getValue());
owner.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE).clear();
assert value.equals(ownerStore.load(key).getValue());
assert owner.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE).get(key) == null;
assert nonOwner.getAdvancedCache().withFlags(Flag.SKIP_CACHE_STORE).get(key) == null;
assert value.equals(nonOwner.get(key));
// need to do the get() on all the owners first to load the values, otherwise assertOwnershipAndNonOwnership might fail
assertOnAllCaches(key, value);