private void verifyThreadsBeforeExpiration(int expectedThreadIds) {
    HARegionQueueStats stats = getCacheClientProxy().getHARegionQueue().getStatistics();

    int actualThreadIds = stats.getThreadIdentiferCount();

    assertThat(actualThreadIds)
        .as("Expected ThreadIdentifier count >= " + expectedThreadIds + " but actual: "
            + actualThreadIds + (isPrimaryServer() ? " at primary." : " at secondary."))
        .isGreaterThanOrEqualTo(expectedThreadIds);
  }
HARegionQueueThreadIdExpiryRegressionTest
<p>
TRAC #48879: Leaking ThreadIdentifiers and DispatchedAndCurrentEvents objects when client uses
many short lived threads
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HARegionQueueThreadIdExpiryRegressionTest.java