@Test
  public void testRegionDestroy() throws Exception {
    final Host host = Host.getHost(0);
    VM server = host.getVM(0);
    VM client = host.getVM(1);

    /* Init Server and Client */
    createServer(server);
    final int thePort = server.invoke(CqQueryUsingPoolDUnitTest::getCacheServerPort);
    final String host0 = NetworkUtils.getServerHostName(server.getHost());

    String poolName = "testRegionDestroy";
    createPool(client, poolName, host0, thePort);

    createClient(client, thePort, host0);

    /* Create CQs. */
    createCQ(client, poolName, "testRegionDestroy_0", cqs[0]);
    createCQ(client, poolName, "testRegionDestroy_1", cqs[0]);
    createCQ(client, poolName, "testRegionDestroy_2", cqs[0]);

    executeCQ(client, "testRegionDestroy_0", false, null);
    executeCQ(client, "testRegionDestroy_1", false, null);
    executeCQ(client, "testRegionDestroy_2", false, null);

    /* Init values at server. */
    final int size = 10;
    registerInterestListCQ(client, regions[0], size, false);
    createValues(server, regions[0], size);

    // Wait for client to Synch.

    waitForCreated(client, "testRegionDestroy_0", KEY + 10);

    // validate CQs.
    validateCQ(client, "testRegionDestroy_0", /* resultSize: */ noTest, /* creates: */ size,
        /* updates: */ noTest, /* deletes; */ noTest, /* queryInserts: */ size,
        /* queryUpdates: */ 0, /* queryDeletes: */ 0, /* totalEvents: */ size);

    // Validate InterestList.
    // CREATE
    client.invoke(new CacheSerializableRunnable("validate updates") {
      @Override
      public void run2() throws CacheException {
        // Wait for the region to become the correct size
        WaitCriterion wc = new WaitCriterion() {
          String excuse;

          @Override
          public boolean done() {
            Region region = getRootRegion().getSubregion(regions[0]);
            if (region == null) {
              excuse = "Can't find region";
              return false;
            }
            int sz = region.entrySet().size();
            if (sz != size) {
              excuse = "Region is of size " + sz + ", expected " + size;
              return false;
            }
            return true;
          }

          @Override
          public String description() {
            return excuse;
          }
        };
        GeodeAwaitility.await().untilAsserted(wc);

        Region region = getRootRegion().getSubregion(regions[0]);
        assertNotNull(region);

        CertifiableTestCacheListener ctl =
            (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
        for (int i = 1; i <= 10; i++) {
          ctl.waitForCreated(KEY + i);
          assertNotNull(region.getEntry(KEY + i));
        }
      }
    });

    // Destroy Region.
    server.invoke(new CacheSerializableRunnable("Destroy Region") {
      @Override
      public void run2() throws CacheException {
        Region region1 = getRootRegion().getSubregion(regions[0]);
        region1.destroyRegion();
      }
    });

    Wait.pause(2 * 1000);
    validateCQCount(client, 0);

    closeClient(client);
    closeServer(server);
  }
This will test the events after region destory. The CQs on the destroy region needs to be
closed.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java