@Test
  public void testClearWithManyEventsInFlight() {
    VM vm0 = VM.getVM(0);
    VM vm1 = VM.getVM(1);
    VM vm2 = VM.getVM(2);
    VM vm3 = VM.getVM(3);

    // create replicated regions in VM 0 and 1, then perform concurrent ops
    // on the same key while creating the region in VM2. Afterward make
    // sure that all three regions are consistent

    final String name = getUniqueName() + "-CC";
    createRegionWithAttribute(vm0, name, false);
    createRegionWithAttribute(vm1, name, false);
    createRegionWithAttribute(vm2, name, false);
    createRegionWithAttribute(vm3, name, false);
    vm0.invoke(DistributedNoAckRegionCCEDUnitTest::addBlockingListener);
    vm1.invoke(DistributedNoAckRegionCCEDUnitTest::addBlockingListener);
    vm2.invoke(DistributedNoAckRegionCCEDUnitTest::addBlockingListener);
    AsyncInvocation<Void> vm0Ops = vm0.invokeAsync(DistributedNoAckRegionCCEDUnitTest::doManyOps);
    AsyncInvocation<Void> vm1Ops = vm1.invokeAsync(DistributedNoAckRegionCCEDUnitTest::doManyOps);
    AsyncInvocation<Void> vm2Ops = vm2.invokeAsync(DistributedNoAckRegionCCEDUnitTest::doManyOps);
    // pause to let a bunch of operations build up
    Wait.pause(5000);
    AsyncInvocation<Void> a0 = vm3.invokeAsync(DistributedNoAckRegionCCEDUnitTest::clearRegion);
    vm0.invoke(DistributedNoAckRegionCCEDUnitTest::unblockListener);
    vm1.invoke(DistributedNoAckRegionCCEDUnitTest::unblockListener);
    vm2.invoke(DistributedNoAckRegionCCEDUnitTest::unblockListener);
    waitForAsyncProcessing(a0, "");
    waitForAsyncProcessing(vm0Ops, "");
    waitForAsyncProcessing(vm1Ops, "");
    waitForAsyncProcessing(vm2Ops, "");

    Wait.pause(2000);// this test has with noack, thus we should wait before validating entries
    // check consistency of the regions
    Map r0Contents = vm0.invoke(MultiVMRegionTestCase::getCCRegionContents);
    Map r1Contents = vm1.invoke(MultiVMRegionTestCase::getCCRegionContents);
    Map r2Contents = vm2.invoke(MultiVMRegionTestCase::getCCRegionContents);
    Map r3Contents = vm3.invoke(MultiVMRegionTestCase::getCCRegionContents);

    for (int i = 0; i < 10; i++) {
      String key = "cckey" + i;
      assertThat(r0Contents.get(key)).withFailMessage("region contents are not consistent")
          .isEqualTo(r1Contents.get(key));
      assertThat(r1Contents.get(key)).withFailMessage("region contents are not consistent")
          .isEqualTo(r2Contents.get(key));
      assertThat(r2Contents.get(key)).withFailMessage("region contents are not consistent")
          .isEqualTo(r3Contents.get(key));
      for (int subi = 1; subi < 3; subi++) {
        String subkey = key + "-" + subi;
        assertThat(r0Contents.get(subkey)).withFailMessage("region contents are not consistent")
            .isEqualTo(r1Contents.get(subkey));
        assertThat(r1Contents.get(subkey)).withFailMessage("region contents are not consistent")
            .isEqualTo(r2Contents.get(subkey));
        assertThat(r2Contents.get(subkey)).withFailMessage("region contents are not consistent")
            .isEqualTo(r3Contents.get(subkey));
      }
    }
  }
Returns region attributes for a <code>GLOBAL</code> region
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedNoAckRegionCCEDUnitTest.java