public static List<Long> getReceiverStats() {
    Set<GatewayReceiver> gatewayReceivers = cache.getGatewayReceivers();
    GatewayReceiver receiver = gatewayReceivers.iterator().next();
    CacheServerStats stats = ((CacheServerImpl) receiver.getServer()).getAcceptor().getStats();
    assertThat(stats instanceof GatewayReceiverStats).isTrue();
    GatewayReceiverStats gatewayReceiverStats = (GatewayReceiverStats) stats;
    List<Long> statsList = new ArrayList<>();
    statsList.add(gatewayReceiverStats.getEventsReceived());
    statsList.add(gatewayReceiverStats.getEventsRetried());
    statsList.add(gatewayReceiverStats.getProcessBatchRequests());
    statsList.add(gatewayReceiverStats.getDuplicateBatchesReceived());
    statsList.add(gatewayReceiverStats.getOutoforderBatchesReceived());
    statsList.add(gatewayReceiverStats.getEarlyAcks());
    statsList.add(gatewayReceiverStats.getExceptionsOccurred());
    statsList.add(gatewayReceiverStats.getPossibleDuplicateEventsReceived());
    return statsList;
  }
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