private void assertThatThreadsStopped() {
    await()
        .atMost(AWAIT_MILLIS, MILLISECONDS)
        .untilAsserted(() -> assertThat(currentThreadCount())
            .isLessThanOrEqualTo(initialThreadCountPlusAwaitility()));
  }
Using Awaitility will increase total thread count by 1: ConditionAwaiter$ConditionPoller.
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorLauncherJmxManagerLocalRegressionTest.java