public void createServer(VM server, final int thePort, final boolean partitioned) {
    SerializableRunnable createServer = new CacheSerializableRunnable("Create Cache Server") {
      @Override
      public void run2() throws CacheException {
        LogWriterUtils.getLogWriter().info("### Create Cache Server. ###");
        AttributesFactory factory = new AttributesFactory();
        factory.setMirrorType(MirrorType.KEYS_VALUES);

        // setting the eviction attributes.
        if (partitioned) {
          factory.setDataPolicy(DataPolicy.PARTITION);
          createRootRegion(factory.createRegionAttributes());
        } else {
          factory.setScope(Scope.DISTRIBUTED_ACK);
          createRegion(region, factory.createRegionAttributes());
        }



        Wait.pause(2000);

        try {
          startBridgeServer(thePort, true);
        }

        catch (Exception ex) {
          Assert.fail("While starting CacheServer", ex);
        }
        Wait.pause(2000);

      }
    };

    server.invoke(createServer);
  }
This test tests the RegionClearedException Path in AbsractRegionMap while doing
initialImagePut() during registerInterest on client.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryIndexUpdateRIDUnitTest.java