@Test
  public void childExecutorService() {
    executorServiceRule.submit(() -> {
      executorService = Executors.newCachedThreadPool();
      executorService.submit(() -> terminateLatch.await(TIMEOUT_MILLIS, MILLISECONDS));
      executorService.submit(() -> terminateLatch.await(TIMEOUT_MILLIS, MILLISECONDS));
      submittedChildren.set(true);
    });

    await().untilTrue(submittedChildren);

    assertThat(executorServiceRule.getThreads().size()).isLessThanOrEqualTo(1);
  }
Unit tests for {@link ExecutorServiceRule#getThreads()}.
geode-junit/src/test/java/org/apache/geode/test/junit/rules/ExecutorServiceRuleGetThreadsTest.java