public void testRemove() throws Exception {
AdvancedCache cache1 = cache(0,"invalidation").getAdvancedCache();
AdvancedCache cache2 = cache(1,"invalidation").getAdvancedCache();
cache1.withFlags(CACHE_MODE_LOCAL).put("key", "value");
assertEquals("value", cache1.get("key"));
cache2.withFlags(CACHE_MODE_LOCAL).put("key", "value");
assertEquals("value", cache2.get("key"));
replListener(cache2).expectAny();
assertEquals("value", cache1.remove("key"));
replListener(cache2).waitForRpc();