@Override
      public void run2() throws CacheException {
        Region region = getRootRegion().getSubregion(regions[0]);
        assertNotNull(region);

        Set keys = region.entrySet();
        assertEquals(
            "Mismatch, number of keys in local region is not equal to the interest list size", size,
            keys.size());

        CertifiableTestCacheListener ctl =
            (CertifiableTestCacheListener) region.getAttributes().getCacheListener();
        for (int i = 1; i <= 10; i++) {
          ctl.waitForInvalidated(KEY + i);
          assertNotNull(region.getEntry(KEY + i));
        }
      }
Test for InterestList and CQ registered from same clients.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java