public static Integer createServerCache() throws Exception {
    new DeltaToRegionRelationCQRegistrationDUnitTest().createCache(new Properties());
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setDataPolicy(DataPolicy.REPLICATE);
    RegionAttributes attrs = factory.create();
    cache.createRegion(REGION_NAME1, attrs);
    cache.createRegion(REGION_NAME2, attrs);

    CacheServer server = cache.addCacheServer();
    int port = getRandomAvailableTCPPort();
    server.setPort(port);
    // ensures updates to be sent instead of invalidations
    server.setNotifyBySubscription(true);
    server.start();
    return server.getPort();

  }
This test does the following for cq registration with initial result set through pool when
<b>failover</b>(<b>cq registration</b>):<br>
1)Verifies when primary goes down, cq registration happen <br>
2)Verifies create entry for region in map stored in CacheCleintProxy <br>
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java