@Test
  public void test018OnlyRequestedUpdates() {
    final String name1 = getName() + "-1";
    final String name2 = getName() + "-2";

    // Cache server serves up both regions
    vm0.invoke("Create Cache Server", () -> {
      RegionFactory<Object, Object> factory = getBridgeServerRegionAttributes(null, null);
      createRegion(name1, factory);
      createRegion(name2, factory);
      startBridgeServer(0);
    });
    final int port = vm0.invoke(ConnectionPoolDUnitTest::getCacheServerPort);
    final String host0 = NetworkUtils.getServerHostName();

    // vm1 sends updates to the server
    vm1.invoke("Create regions", () -> {
      getLonerSystem();
      getCache();
      RegionFactory<Object, Object> factory = getCache().createRegionFactory();
      factory.setScope(Scope.LOCAL);
      factory.setConcurrencyChecksEnabled(false);

      configureConnectionPool(factory, host0, new int[] {port}, true, -1, -1, null);

      Region rgn = createRegion(name1, factory);
      rgn.registerInterestRegex(".*", false, false);
      rgn = createRegion(name2, factory);
      rgn.registerInterestRegex(".*", false, false);
    });

    // vm2 only wants updates to updates to region1
    vm2.invoke("Create region", () -> {
      getLonerSystem();
      getCache();
      RegionFactory<Object, Object> factory = getCache().createRegionFactory();
      factory.setScope(Scope.LOCAL);
      factory.setConcurrencyChecksEnabled(false);

      configureConnectionPool(factory, host0, new int[] {port}, true, -1, -1, null);

      Region rgn = createRegion(name1, factory);
      rgn.registerInterestRegex(".*", false, false);
      createRegion(name2, factory);
      // no interest registration for region 2

    });

    Stream.of(vm1, vm2).forEach(vm -> vm.invoke("Populate region", () -> {
      Region<Object, Object> region1 = getRootRegion().getSubregion(name1);
      for (int i = 0; i < 10; i++) {
        region1.put(i, "Region1Old" + i);
      }
      Region<Object, Object> region2 = getRootRegion().getSubregion(name2);
      for (int i = 0; i < 10; i++) {
        region2.put(i, "Region2Old" + i);
      }
    }));

    vm1.invoke("Update", () -> {
      Region<Object, Object> region1 = getRootRegion().getSubregion(name1);
      for (int i = 0; i < 10; i++) {
        region1.put(i, "Region1New" + i);
      }
      Region<Object, Object> region2 = getRootRegion().getSubregion(name2);
      for (int i = 0; i < 10; i++) {
        region2.put(i, "Region2New" + i);
      }
    });

    // Wait for updates to be propagated
    vm2.invoke("Validate", () -> {
      Region<Object, Object> region1 = getRootRegion().getSubregion(name1);
      for (int i = 0; i < 10; i++) {
        final int testInt = i;
        await().until(() -> (region1.get(testInt).equals("Region1New" + testInt)));
      }
      Region<Object, Object> region2 = getRootRegion().getSubregion(name2);
      for (int i = 0; i < 10; i++) {
        final int testInt = i;
        await().until(() -> region2.get(testInt).equals(("Region2Old" + testInt)));
      }
    });

    vm1.invoke("Close Pool", () -> {
      // Terminate region1's Pool
      Region<Object, Object> region1 = getRootRegion().getSubregion(name1);
      region1.localDestroyRegion();
      // Terminate region2's Pool
      Region<Object, Object> region2 = getRootRegion().getSubregion(name2);
      region2.localDestroyRegion();
    });

    vm2.invoke("Close Pool", () -> {
      // Terminate region1's Pool
      Region<Object, Object> region1 = getRootRegion().getSubregion(name1);
      region1.localDestroyRegion();
    });


  }
Tests that updates are not sent to VMs that did not ask for them.
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolDUnitTest.java