public static Integer createServerCache(Boolean isListenerPresent) throws Exception {
    new HAConflationDistributedTest().createCache(new Properties());
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setEnableConflation(true);
    factory.setDataPolicy(DataPolicy.REPLICATE);
    if (isListenerPresent == true) {
      CacheListener serverListener = new HAClientCountEventListener();
      factory.setCacheListener(serverListener);
    }
    RegionAttributes attrs = factory.create();
    basicGetCache().createRegion(regionName, attrs);
    CacheServerImpl server = (CacheServerImpl) basicGetCache().addCacheServer();
    assertNotNull(server);
    int port = getRandomAvailableTCPPort();
    server.setPort(port);
    server.setNotifyBySubscription(true);
    server.start();
    return server.getPort();
  }
In this test do a create , update , update & destroy. The client should receive 3 callbacks (
craete , conflated update & destroy).
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HAConflationDistributedTest.java