@Override
      public void run2() throws CacheException {
        Region r = getRootRegion();
        assertEquals(null, r.getEntry("createKey"));
        // assertIndexDetailsEquals("putValue", r.getEntry("createKey").getValue());
        {
          int evIdx = 0;
          TestCacheListener cl = (TestCacheListener) r.getAttributes().getCacheListener();
          List events = cl.getEventHistory();
          {
            CacheEvent ce = (CacheEvent) events.get(evIdx++);
            assertEquals(REGION_CREATE, ce.getOperation());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(CREATE, ee.getOperation());
            assertEquals("createKey", ee.getKey());
            assertEquals("createValue", ee.getNewValue());
            assertEquals(null, ee.getOldValue());
            assertEquals("createCBArg", ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(INVALIDATE, ee.getOperation());
            assertEquals("createKey", ee.getKey());
            assertEquals(null, ee.getNewValue());
            assertEquals("createValue", ee.getOldValue());
            assertEquals("invalidateCBArg", ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(UPDATE, ee.getOperation());
            assertEquals("createKey", ee.getKey());
            assertEquals("putValue", ee.getNewValue());
            assertEquals(null, ee.getOldValue());
            assertEquals("putCBArg", ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(DESTROY, ee.getOperation());
            assertEquals("createKey", ee.getKey());
            assertEquals(null, ee.getNewValue());
            assertEquals("putValue", ee.getOldValue());
            assertEquals("destroyCBArg", ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(PUTALL_CREATE, ee.getOperation());
            assertEquals("aKey", ee.getKey());
            assertEquals("aValue", ee.getNewValue());
            assertEquals(null, ee.getOldValue());
            assertEquals(null, ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            EntryEvent ee = (EntryEvent) events.get(evIdx++);
            assertEquals(PUTALL_CREATE, ee.getOperation());
            assertEquals("bKey", ee.getKey());
            assertEquals("bValue", ee.getNewValue());
            assertEquals(null, ee.getOldValue());
            assertEquals(null, ee.getCallbackArgument());
            assertEquals(true, ee.isOriginRemote());
          }
          {
            RegionEvent re = (RegionEvent) events.get(evIdx++);
            assertEquals(REGION_INVALIDATE, re.getOperation());
            assertEquals("invalidateRegionCBArg", re.getCallbackArgument());
            assertEquals(true, re.isOriginRemote());
          }
          {
            RegionEvent re = (RegionEvent) events.get(evIdx++);
            assertEquals(REGION_CLEAR, re.getOperation());
            assertEquals(null, re.getCallbackArgument());
            assertEquals(true, re.isOriginRemote());
          }

          assertEquals(evIdx, events.size());
        }
      }
Make sure that cache operations are queued when a required role is missing
geode-core/src/distributedTest/java/org/apache/geode/cache30/QueueMsgDUnitTest.java