@Test
  public void awaitTermination() {
    Result result = TestRunner.runTest(Awaits.class);
    assertThat(result.wasSuccessful()).isTrue();

    assertThat(isTestHung()).isTrue();
    await().untilAsserted(() -> assertThat(executorService.isTerminated()).isTrue());
    invocations.afterRule();

    InOrder invocationOrder = inOrder(invocations);
    invocationOrder.verify(invocations).afterTest();
    invocationOrder.verify(invocations).afterHangLatch();
    invocationOrder.verify(invocations).afterTerminateLatch();
    invocationOrder.verify(invocations).afterRule();
    invocationOrder.verifyNoMoreInteractions();
  }
Integration tests for {@link ExecutorServiceRule}. These are tests that pause a little longer
than acceptable for a unit test.
geode-junit/src/integrationTest/java/org/apache/geode/test/junit/rules/ExecutorServiceRuleIntegrationTest.java