public static void validateSecondaryQueueSizeStat(String id, final int queueSize) {
    final AbstractGatewaySender sender = (AbstractGatewaySender) cache.getGatewaySender(id);
    await()
        .untilAsserted(() -> assertThat(sender.getStatistics().getUnprocessedEventMapSize()).as(
            "Expected unprocessedEventMap is drained but actual is "
                + sender.getStatistics().getUnprocessedEventMapSize())
            .isEqualTo(queueSize));
    assertThat(sender.getStatistics().getUnprocessedEventMapSize()).isEqualTo(queueSize);
  }
To be used only for ParallelGatewaySender.

@param senderId Id of the ParallelGatewaySender
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/WANTestBase.java