public AcceptorImpl getAcceptorImplFromCache(GemFireCache cache) {
    GemFireCacheImpl gemFireCache = (GemFireCacheImpl) cache;
    List<CacheServer> cacheServers = gemFireCache.getCacheServers();
    if (cacheServers.size() != 1) {
      return null;
    }

    InternalCacheServer cacheServer = (InternalCacheServer) cacheServers.get(0);
    return (AcceptorImpl) cacheServer.getAcceptor();
  }
@return the cache's Acceptor, if there is exactly one CacheServer. Otherwise null.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/AcceptorImplDUnitTest.java