private void attachBridgeServer() throws IOException {
    CacheServerImpl server = (CacheServerImpl) cache.addCacheServer();
    assertNotNull(server);
    int port = getRandomAvailableTCPPort();
    server.setPort(port);
    server.getClientSubscriptionConfig().setEvictionPolicy(HARegionQueue.HA_EVICTION_POLICY_ENTRY);
    server.start();
    assertNotNull("client messages region is null ",
        server.getAcceptor().getCacheClientNotifier().getHaContainer());
    // check for is LIFO Enable
    String regionName =
        ((HAContainerWrapper) server.getAcceptor().getCacheClientNotifier().getHaContainer())
            .getName();
    EvictionAttributesImpl ea = (EvictionAttributesImpl) cache
        .getRegion(SEPARATOR + regionName).getAttributes().getEvictionAttributes();
    assertTrue("Eviction Algorithm is not LIFO", ea.isLIFO());
    // The CacheClientNotifier is a singleton.
    if (cache.getCacheServers().size() <= 1) {
      assertTrue("client messages region name should not be present ",
          (regionNames).add(regionName));
    } else {
      assertTrue("client messages region name should have been already present ",
          (regionNames).contains(regionName));
    }
  }
Create and attach cache server to cache
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java