@Test
  public void test023ContainsKeyOnServer() throws CacheException {
    final String name = getName();

    vm0.invoke("Create Cache Server", () -> {
      RegionFactory<Object, Object> factory = getCache().createRegionFactory();
      factory.setScope(Scope.DISTRIBUTED_ACK);
      factory.setConcurrencyChecksEnabled(false);
      createRegion(name, factory);
      startBridgeServer(0);
    });

    final int port = vm0.invoke(ConnectionPoolDUnitTest::getCacheServerPort);
    final String host0 = NetworkUtils.getServerHostName();

    Stream.of(vm1, vm2).forEach(vm -> vm.invoke("Create region", () -> {
      getLonerSystem();
      getCache();
      RegionFactory<Object, Object> factory = getCache().createRegionFactory();
      factory.setScope(Scope.LOCAL);
      factory.setConcurrencyChecksEnabled(false);
      configureConnectionPool(factory, host0, new int[] {port}, false, -1, -1, null);
      createRegion(name, factory);
    }));

    final Integer key1 = 0;
    final String key2 = "0";
    vm2.invoke("Contains key on server", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      boolean containsKey;
      containsKey = region.containsKeyOnServer(key1);
      assertThat(containsKey).isFalse();
      containsKey = region.containsKeyOnServer(key2);
      assertThat(containsKey).isFalse();
    });

    vm1.invoke("Put values", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      region.put(0, 0);
      region.put("0", "0");
    });

    vm2.invoke("Contains key on server", () -> {
      Region<Object, Object> region = getRootRegion().getSubregion(name);
      boolean containsKey = region.containsKeyOnServer(key1);
      assertThat(containsKey).isTrue();
      containsKey = region.containsKeyOnServer(key2);
      assertThat(containsKey).isTrue();
    });

    for (VM vm : Arrays.asList(vm1, vm2)) {
      vm.invoke("Close Pool", () -> {
        Region<Object, Object> region = getRootRegion().getSubregion(name);
        region.localDestroyRegion();
      });
    }


  }
Tests the containsKeyOnServer operation of the {@link Pool}

@since GemFire 5.0.2
geode-core/src/distributedTest/java/org/apache/geode/cache/ConnectionPoolDUnitTest.java