private void prepConcurrentEventsTest(String name, SerializableRunnable createRegion) {
    vm0.invoke(createRegion);
    vm1.invoke(createRegion);
    vm3.invoke(createRegion);

    SerializableRunnable performOps = new SerializableRunnable() {
      @Override
      public void run() {
        try {
          try {
            Thread.sleep(500);
          } catch (InterruptedException e) {
            fail("sleep was interrupted");
          }
          doOpsLoop(false);
          // This send serial message is only going to flush the operations
          // from the empty member to *one* of the replicas, not all of them.
          sendSerialMessageToAll();

          if (CCRegion.getAttributes().getDataPolicy().withReplication()) {
            long events = CCRegion.getCachePerfStats().getConflatedEventsCount();
            assertThat(events > 0).describedAs("expected some event conflation").isTrue();
          }
        } catch (CacheException e) {
          fail("while performing concurrent operations", e);
        }
      }
    };

    AsyncInvocation<Void> a0 = vm0.invokeAsync("perform concurrent ops", performOps);
    AsyncInvocation<Void> a1 = vm1.invokeAsync("perform concurrent ops", performOps);

    // try {
    // Thread.sleep(500);
    // } catch (InterruptedException e) {
    // fail("sleep was interrupted");
    // }

    vm2.invoke(createRegion);
    boolean a0failed = waitForAsyncProcessing(a0, "expected some event conflation");
    boolean a1failed = waitForAsyncProcessing(a1, "expected some event conflation");
    if (a0failed && a1failed) {
      fail("neither member saw event conflation - check stats for " + name);
    }
  }
This tests the concurrency versioning system to ensure that event conflation happens correctly
and that the statistic is being updated properly
geode-dunit/src/main/java/org/apache/geode/cache30/MultiVMRegionTestCase.java