public static void waitForSenderNonRunningState(String senderId) {
    try (IgnoredException ignored = addIgnoredException("Could not connect")) {
      Set<GatewaySender> senders = cache.getGatewaySenders();
      final GatewaySender sender = getGatewaySenderById(senders, senderId);
      await()
          .untilAsserted(
              () -> assertThat((sender != null && !sender.isRunning())).as(
                  "Expected sender isRunning state to " + "be false but is true").isEqualTo(true));
    }
  }
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