public static Integer registerInterestList() {
    try {
      Region r = CacheServerTestUtil.getCache().getRegion(SEPARATOR + REGION_NAME);
      assertNotNull(r);
      r.registerInterest("key-1");
      r.registerInterest("key-2");
      r.registerInterest("key-3");
      r.registerInterest("key-4");
      r.registerInterest("key-5");
      // now return the port of the primary.
      PoolImpl p = (PoolImpl) PoolManager.find(r.getAttributes().getPoolName());
      return p.getPrimaryPort();
    } catch (Exception ex) {
      Assert.fail("failed while registering keys k1 to k5", ex);
      return null;
    }
  }
one server two clients create Entries in all vms c1 : register (k1,k2,k3,k4,k5) c2 : put (k1 ->
vm2-key-1) and (k6 -> vm2-key-6) c1 : validate (r.getEntry("key-1").getValue() == "vm2-key-1")
(r.getEntry("key-6").getValue() == "key-6") // as it is not registered s1 : stop server s1 :
start server c2 : put (k1 -> vm2-key-1) and (k6 -> vm2-key-6) c1 : validate
(r.getEntry("key-1").getValue() == "vm2-key-1") (r.getEntry("key-6").getValue() == "key-6") //
as it is not registered
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/InterestListFailoverDUnitTest.java