private void createClientCache(final String host, final int serverPort) {
    ClientCache cache = managementTestRule.getClientCache();

    Pool pool = PoolManager.createFactory().addServer(host, serverPort)
        .setSubscriptionEnabled(false).setMinConnections(1)
        .setReadTimeout(20000).setPingInterval(10000).setRetryAttempts(1)
        .setSubscriptionEnabled(true).setStatisticInterval(1000).create(getClass().getSimpleName());

    ClientRegionFactory factory =
        cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
    factory.setPoolName(pool.getName());
    factory.create(REGION_NAME);
  }
This is for testing client IDs
geode-core/src/distributedTest/java/org/apache/geode/management/internal/pulse/TestClientIdsDUnitTest.java