@Test
  public void testEntryVersionRollover() throws Exception {
    assumeThat(getClass() == DistributedAckRegionCCEDUnitTest.class).isTrue();

    final String name = getUniqueName() + "-CC";
    final int numEntries = 1;
    SerializableRunnable createRegion = new SerializableRunnable() {
      @Override
      public void run() {
        RegionFactory f = getCache().createRegionFactory(getRegionAttributes());
        CCRegion = (LocalRegion) f.create(name);
        for (int i = 0; i < numEntries; i++) {
          CCRegion.put("cckey" + i, "ccvalue");
        }
        assertThat(CCRegion.getCachePerfStats().getConflatedEventsCount())
            .describedAs("conflated event count")
            .isEqualTo(0);

      }
    };
    VM vm0 = VM.getVM(0);
    vm0.invoke("Create Region", createRegion);
    try {
      createRegion.run();
      VersionTag tag = new VMVersionTag();
      // set the version to the max - it should make the system think there's a rollover and reject
      // the change. Then apply it to the cache as if it is a replayed client operation. That should
      // cause the cache to apply the op locally
      tag.setEntryVersion(0xFFFFFF);
      tag.setDistributedSystemId(1);
      tag.setRegionVersion(CCRegion.getVersionVector().getNextVersion());
      VersionTagHolder holder = new VersionTagHolder(tag);
      ClientProxyMembershipID id = ClientProxyMembershipID
          .getNewProxyMembership(CCRegion.getDistributionManager().getSystem());
      CCRegion.basicBridgePut("cckey0", "newvalue", null, true, null, id, holder, true);
      vm0.invoke("check conflation count", () -> {
        // after changed the 3rd try of AUO.doPutOrCreate to be ifOld=false ifNew=false
        // ARM.updateEntry will be called one more time, so there will be 2 conflicted events
        assertThat(CCRegion.getCachePerfStats().getConflatedEventsCount())
            .describedAs("conflated event count")
            .isEqualTo(2);
      });
    } finally {
      disconnectAllFromDS();
    }
  }
This tests the concurrency versioning system to ensure that event conflation happens correctly
and that the statistic is being updated properly
geode-core/src/distributedTest/java/org/apache/geode/cache30/DistributedAckRegionCCEDUnitTest.java