public static Map<String, Integer> getCacheServers() {
    List<CacheServer> cacheServers = cache.getCacheServers();

    Map<String, Integer> cacheServersMap = new HashMap<>();
    int bridgeServerCounter = 0;
    int receiverServerCounter = 0;
    for (final CacheServer server : cacheServers) {
      CacheServerImpl cacheServer = (CacheServerImpl) server;
      if (cacheServer.getAcceptor().isGatewayReceiver()) {
        receiverServerCounter++;
      } else {
        bridgeServerCounter++;
      }
    }
    cacheServersMap.put("BridgeServer", bridgeServerCounter);
    cacheServersMap.put("ReceiverServer", receiverServerCounter);
    return cacheServersMap;
  }
Returns a Map that contains the count for number of cache server and number of Receivers.
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java