CacheSerializableRunnable getCacheSerializableRunnableForRegionClose(
      final String regionName, final int redundancy, final Class constraint) {
    SerializableRunnable PrRegion = new CacheSerializableRunnable("regionClose") {
      @Override
      public void run2() throws CacheException {
        Cache cache = getCache();
        final String expectedRegionDestroyedException = RegionDestroyedException.class.getName();
        getCache().getLogger().info("<ExpectedException action=add>"
            + expectedRegionDestroyedException + "</ExpectedException>");
        final String expectedReplyException = ReplyException.class.getName();
        getCache().getLogger().info(
            "<ExpectedException action=add>" + expectedReplyException + "</ExpectedException>");

        Region region = cache.getRegion(regionName);
        LogWriterUtils.getLogWriter().info(
            "PROperationWithQueryDUnitTest#getCacheSerializableRunnableForRegionClose: Closing region");
        region.close();
        LogWriterUtils.getLogWriter().info(
            "PROperationWithQueryDUnitTest#getCacheSerializableRunnableForRegionClose: Region Closed on VM ");
        AttributesFactory attr = new AttributesFactory();
        attr.setValueConstraint(constraint);
        PartitionAttributesFactory paf = new PartitionAttributesFactory();
        PartitionAttributes prAttr = paf.setRedundantCopies(redundancy).create();
        attr.setPartitionAttributes(prAttr);
        cache.createRegion(regionName, attr.create());
        LogWriterUtils.getLogWriter().info(
            "PROperationWithQueryDUnitTest#getCacheSerializableRunnableForRegionClose: Region Recreated on VM ");
        getCache().getLogger().info(
            "<ExpectedException action=remove>" + expectedReplyException + "</ExpectedException>");
        getCache().getLogger().info("<ExpectedException action=remove>"
            + expectedRegionDestroyedException + "</ExpectedException>");
      }

    };
    return (CacheSerializableRunnable) PrRegion;
  }
This function <br>
1. calls the region.close on the VM <br>
2. creates the cache again & also the PR <br>

@return cacheSerializable object
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRQueryDUnitHelper.java