private int createServerCache(Boolean isListAttach, Boolean isEmpty) throws IOException {
    Properties props = new Properties();
    createCache(props);
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setConcurrencyChecksEnabled(true);
    if (isEmpty) {
      factory.setDataPolicy(DataPolicy.EMPTY);
    } else {
      factory.setDataPolicy(DataPolicy.REPLICATE);
    }

    lastKeyReceived = false;
    RegionAttributes attrs = factory.create();
    deltaPR = cache.createRegion(REGION_NAME, attrs);
    AttributesMutator am = deltaPR.getAttributesMutator();
    if (isListAttach) {
      am.addCacheListener(new CacheListenerAdapter() {
        @Override
        public void afterCreate(EntryEvent event) {
          if (event.getNewValue() == null) {
            isFailed = true;
          }

          if (event.getKey().equals(LAST_KEY)) {
            lastKeyReceived = true;
          }
        }

        @Override
        public void afterUpdate(EntryEvent event) {
          if (event.getNewValue() == null) {
            isFailed = true;
          }
        }
      });
    }

    CacheServer server = cache.addCacheServer();
    int port = getRandomAvailableTCPPort();
    server.setPort(port);
    // ensures updates to be sent instead of invalidations
    server.setNotifyBySubscription(true);
    server.start();
    return server.getPort();
  }
1) One accessor and one datastore is defined with a PR with zero redundant copies. 2) Client is
connected only to the accessor. 3) One delta put is performed on datastore. 4) Flag to cause
toDelta() throw an exception is set on datastore. 5) Another delta put is performed on
datastore. 6) Verify that the second delta put fails and value on datastore is same as the one
put by first delta update.
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PRDeltaPropagationDistributedTest.java