@Test
  public void testSimpleDurableClientMultipleServers() {
    // Start server 1
    server1Port = server1VM.invoke(
        () -> createCacheServer(regionName, true));

    // Start server 2 using the same mcast port as server 1
    final int server2Port = server2VM
        .invoke(() -> createCacheServer(regionName, true));

    // Start a durable client connected to both servers that is kept alive when
    // it stops normally

    durableClientId = getName() + "_client";
    durableClientVM.invoke(() -> createCacheClient(
        getClientPool(getServerHostName(), server1Port, server2Port, true),
        regionName,
        getClientDistributedSystemProperties(durableClientId, VERY_LONG_DURABLE_TIMEOUT_SECONDS),
        true));

    // Send clientReady message
    sendClientReady(durableClientVM);

    // Verify durable client on server 1
    verifyDurableClientPresence(VERY_LONG_DURABLE_TIMEOUT_SECONDS, durableClientId, server1VM, 1);

    // Verify durable client on server 2
    verifyDurableClientPresence(VERY_LONG_DURABLE_TIMEOUT_SECONDS, durableClientId, server2VM, 1);

    // Stop the durable client
    durableClientVM.invoke(() -> CacheServerTestUtil.closeCache(true));

    // Verify the durable client is still on server 1
    verifyDurableClientPresence(VERY_LONG_DURABLE_TIMEOUT_SECONDS, durableClientId, server1VM, 1);

    // Verify the durable client is still on server 2
    verifyDurableClientPresence(VERY_LONG_DURABLE_TIMEOUT_SECONDS, durableClientId, server2VM, 1);

    // Start up the client again. This time initialize it so that it is not kept
    // alive on the servers when it stops normally.
    durableClientVM.invoke(() -> createCacheClient(
        getClientPool(getServerHostName(), server1Port, server2Port, true),
        regionName, getClientDistributedSystemProperties(durableClientId), true));

    // Send clientReady message
    sendClientReady(durableClientVM);

    // Verify durable client on server1
    verifyDurableClientPresence(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT, durableClientId,
        server1VM, 1);

    // Verify durable client on server2
    verifyDurableClientPresence(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT, durableClientId,
        server2VM, 1);

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

    verifyDurableClientPresence(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT,
        durableClientId, server1VM, 0);

    verifyDurableClientPresence(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT,
        durableClientId, server2VM, 0);

    // Stop server 1
    server1VM.invoke((SerializableRunnableIF) CacheServerTestUtil::closeCache);

    // Stop server 2
    server2VM.invoke((SerializableRunnableIF) CacheServerTestUtil::closeCache);
  }
Test that starting a durable client on multiple servers is processed correctly.
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java