@Test
  public void testDSMDetectsServerLiveJustAfterInterestRegistration() throws Exception {
    createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));

    createEntriesK1andK2();
    server1.invoke(HAInterestTestCase::createEntriesK1andK2);
    server2.invoke(HAInterestTestCase::createEntriesK1andK2);
    server3.invoke(HAInterestTestCase::createEntriesK1andK2);

    VM backup = getBackupVM();
    backup.invoke(HAInterestTestCase::stopServer);
    verifyDeadAndLiveServers(1, 2);

    setClientServerObserverForAfterRegistration(backup);
    try {
      registerK1AndK2();
      waitForAfterRegistrationCallback();
    } finally {
      unSetClientServerObserverForRegistrationCallback();
    }

    server1.invoke(HAInterestTestCase::verifyInterestRegistration);
    server2.invoke(HAInterestTestCase::verifyInterestRegistration);
    server3.invoke(HAInterestTestCase::verifyInterestRegistration);
  }
Tests a scenario in which Dead Server Monitor detects Server Live Just After interest
registration then interest should be registered on the newly detected live server as well
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/HAInterestPart2DUnitTest.java