@Test
  public void rejectAttemptToRegisterInterestInLonerSystem() throws Exception {
    final String name = getUniqueName();
    final String regionName1 = name + "-1";

    // create first cache server with region for client...
    final int firstServerIdx = 1;

    final VM firstServerVM = Host.getHost(0).getVM(firstServerIdx);
    firstServerVM.invoke(new CacheSerializableRunnable("Create first cache server") {
      @Override
      public void run2() throws CacheException {
        Cache cache = new CacheFactory().set("mcast-port", "0").create();

        try {
          CacheServer bridge = cache.addCacheServer();
          bridge.setPort(0);
          bridge.setMaxThreads(getMaxThreads());
          bridge.start();
          bridgeServerPort = bridge.getPort();
        } catch (IOException e) {
          LogWriterUtils.getLogWriter().error("startBridgeServer threw IOException", e);
          fail("startBridgeServer threw IOException ", e);
        }
        assertTrue(bridgeServerPort != 0);

        Region region1 = cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName1);
      }
    });

    // get the cache server ports...
    int port = firstServerVM.invoke(ClientRegisterInterestDUnitTest::getBridgeServerPort);

    try {
      ClientCache clientCache =
          new ClientCacheFactory().addPoolServer(firstServerVM.getHost().getHostName(), port)
              .setPoolSubscriptionEnabled(true).create();
      Region region = clientCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
          .create(regionName1);
      region.registerInterestRegex(".*");
      fail();
    } catch (ServerOperationException e) {
      // expected
      if (!e.getRootCause().getMessage().equals(
          "Should not register interest for a partitioned region when mcast-port is 0 and no locator is present")) {
        fail();
      }
    }
  }
Tests failover of register interest from client point of view. Related bugs include:

<p>
Bug 35654 "failed re-registration may never be detected and thus may never re-re-register"

<p>
Bug 35639 "registerInterest re-registration happens everytime a healthy server is detected"

<p>
Bug 35655 "a single failed re-registration causes all other pending re-registrations to be
cancelled"
geode-core/src/distributedTest/java/org/apache/geode/cache30/ClientRegisterInterestDUnitTest.java