@Test
  public void testGetAllDurableCqsFromServer() {


    // Start server 1
    server1Port = server1VM.invoke(CacheServerTestUtil.class,
        "createCacheServer", new Object[] {regionName, true});

    // Start server 2
    final int server2Port = server2VM.invoke(CacheServerTestUtil.class,
        "createCacheServer", new Object[] {regionName, true});

    // Start a durable client
    durableClientId = getName() + "_client";
    durableClientVM.invoke(() -> {
      createCacheClient(getClientPool(NetworkUtils.getServerHostName(),
          server1Port, server2Port,
          true, 0),
          regionName, getClientDistributedSystemProperties(durableClientId, 60), true);

    });

    // Send clientReady message
    sendClientReady(durableClientVM);

    // Register durable CQ
    String cqName = getName() + "_cq";
    registerDurableCq(cqName);

    // Execute getAllDurableCqsFromServer on the client
    List<String> durableCqNames =
        durableClientVM.invoke(DurableClientCQDUnitTest::getAllDurableCqsFromServer);

    durableClientVM.invoke(() -> verifyDurableCqs(durableCqNames, cqName));

    // Stop the durable client
    durableClientVM.invoke((SerializableRunnableIF) CacheServerTestUtil::closeCache);

    // Stop the servers
    server1VM.invoke((SerializableRunnableIF) CacheServerTestUtil::closeCache);
    server2VM.invoke((SerializableRunnableIF) CacheServerTestUtil::closeCache);
  }
Tests situation where a client is trying to reconnect while a cq is being drained
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientCQDUnitTest.java