public static void createClientCache(String host, Integer port1, Integer port2) throws Exception {
    InterestListRecoveryDUnitTest test = new InterestListRecoveryDUnitTest();
    Properties props = new Properties();
    props.setProperty(MCAST_PORT, "0");
    props.setProperty(LOCATORS, "");
    cache = test.createCache(props);
    PoolImpl p = (PoolImpl) PoolManager.createFactory().addServer(host, port1)
        .addServer(host, port2).setSubscriptionEnabled(true)
        .setSubscriptionRedundancy(-1).setReadTimeout(250)
        .setSocketBufferSize(32768).setMinConnections(4)
        // .setRetryAttempts(5)
        // .setRetryInterval(1000)
        .create("InterestListRecoveryDUnitTestPool");

    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setPoolName(p.getName());
    RegionAttributes attrs = factory.create();
    cache.createRegion(REGION_NAME, attrs);
    pool = p;

  }
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