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

    // Start server 2
    int server2Port = server2VM
        .invoke(() -> createCacheServer(regionName, true));

    // Start normal publisher client
    publisherClientVM.invoke(() -> createCacheClient(getClientPool(getServerHostName(),
        server1Port, server2Port, false), regionName));

    // Create an entry
    publishEntries(publisherClientVM, 0, 1);

    // Start a durable client with the ControlListener
    durableClientId = getName() + "_client";
    durableClientVM.invoke(() -> createCacheClient(
        getClientPool(getServerHostName(), server1Port, server2Port, true), regionName,
        getClientDistributedSystemProperties(durableClientId, VERY_LONG_DURABLE_TIMEOUT_SECONDS),
        true));

    durableClientVM.invoke(() -> {
      await().atMost(HEAVY_TEST_LOAD_DELAY_SUPPORT_MULTIPLIER, MINUTES)
          .pollInterval(100, MILLISECONDS)
          .untilAsserted(() -> assertThat(getCache()).isNotNull());
    });

    // Send clientReady message
    sendClientReady(durableClientVM);

    // Use ClientSession on the server to ` in entry key on behalf of durable client
    boolean server1IsPrimary = false;
    boolean registered = server1VM.invoke(() -> DurableClientSimpleDUnitTest
        .registerInterestWithClientSession(durableClientId, regionName, String.valueOf(0)));
    if (registered) {
      server1IsPrimary = true;
    } else {
      registered = server2VM.invoke(() -> DurableClientSimpleDUnitTest
          .registerInterestWithClientSession(durableClientId, regionName, String.valueOf(0)));
    }
    assertThat(registered)
        .describedAs("ClientSession interest registration failed to occur in either server.")
        .isTrue();

    // Verify durable client received create event
    checkListenerEvents(1, 1, TYPE_CREATE, durableClientVM);

    // Wait for QRM to be processed on the secondary
    waitForEventsRemovedByQueueRemovalMessage(server1IsPrimary ? server2VM : server1VM,
        durableClientId);

    // Stop durable client
    disconnectDurableClient(true);

    // restart durable client
    restartDurableClient(VERY_LONG_DURABLE_TIMEOUT_SECONDS,
        getClientPool(getServerHostName(), server1Port, server2Port, true), true);

    // Send clientReady message
    sendClientReady(durableClientVM);
    // Verify durable client does not receive create event
    checkListenerEvents(0, 1, TYPE_CREATE, durableClientVM);

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

    // 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