private int createCacheServerWithPRDatastore() throws IOException {
    cacheRule.createCache();

    PartitionAttributesFactory<String, String> partitionAttributesFactory =
        new PartitionAttributesFactory<>();
    partitionAttributesFactory.setRedundantCopies(1);
    partitionAttributesFactory.setTotalNumBuckets(TOTAL_NUM_BUCKETS);

    RegionFactory<String, String> regionFactory =
        cacheRule.getCache().createRegionFactory(RegionShortcut.PARTITION);
    regionFactory.setConcurrencyChecksEnabled(false);
    regionFactory.setEntryTimeToLive(new ExpirationAttributes(3, ExpirationAction.DESTROY));
    regionFactory.setPartitionAttributes(partitionAttributesFactory.create());

    regionFactory.create(regionName);

    CacheServer cacheServer = cacheRule.getCache().addCacheServer();
    cacheServer.setPort(0);
    cacheServer.start();
    return cacheServer.getPort();
  }
The test creates two datastores with a partitioned region, and also running a cache server each.
A publisher client is connected to one server while a subscriber client is connected to both the
servers. The partitioned region has entry expiry set with ttl of 3 seconds and action as DESTROY.
The test ensures that the EXPIRE_DESTROY events are propagated to the subscriber client and the
secondary server does process the QRMs for the EXPIRE_DESTROY events.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/QueueRemovalMessageProcessingDistributedTest.java