@Test
  public void testKeyInterestRecoveryWhileProcessException() throws Exception {
    VM serverFirstRegistered = null;
    VM serverSecondRegistered = null;

    LogWriter logger = basicGetSystem().getLogWriter();
    createEntries();
    server2.invoke(InterestListRecoveryDUnitTest::createEntries);
    server1.invoke(InterestListRecoveryDUnitTest::createEntries);

    registerK1toK5();
    logger.fine("After registerK1toK5");

    // Check which server InterestList is registered. Based on it verify
    // Register/Unregister on respective servers.
    if (isInterestListRegisteredToServer1()) {
      serverFirstRegistered = server1;
      serverSecondRegistered = server2;
      logger.fine("serverFirstRegistered is server1 and serverSecondRegistered is server2");
    } else {
      serverFirstRegistered = server2;
      serverSecondRegistered = server1;
      logger.fine("serverFirstRegistered is server2 and serverSecondRegistered is server1");
    }
    verifyDeadAndLiveServers(0, 2);
    serverFirstRegistered
        .invoke(InterestListRecoveryDUnitTest::verifyRegionToProxyMapForFullRegistration);
    logger.fine("After verifyRegionToProxyMapForFullRegistration on serverFirstRegistered");
    logger.info("<ExpectedException action=add>" + SocketException.class.getName()
        + "</ExpectedException>");
    logger.info(
        "<ExpectedException action=add>" + EOFException.class.getName() + "</ExpectedException>");
    killCurrentEndpoint();
    logger.fine("After killCurrentEndpoint1");
    serverSecondRegistered.invoke(
        InterestListRecoveryDUnitTest::verifyRegionToProxyMapForFullRegistrationRetry);
    logger.fine("After verifyRegionToProxyMapForFullRegistration on serverSecondRegistered");
    unregisterK1toK3();
    serverSecondRegistered.invoke(InterestListRecoveryDUnitTest::verifyRegisterK4toK5Retry);
    logger.fine("After verifyRegisterK4toK5Retry on serverSecondRegistered");
  }
Test Scenario :

one client(c1) two servers(s1,s2) s1,s2 ----> available c1: register k1,k2,k3,k4,k5 s1 ---->
unavailable // fail over should happen to server s2 see all keys k1,k2,k3,k4,k5 are registered on
s2 c1: unregister k1,k2,k3 see interest list on s1 contains only s4, s5 s2 ----> unavaliable //
fail over should to s1 with intrest list s4,s5 see only k4 and k5 are registerd on s1
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java