@Test
  public void testStatMonitorNotifierAliveButWaiting() throws Exception {
    StatMonitorHandler handler = new StatMonitorHandler();
    TestStatisticsMonitor monitor = new TestStatisticsMonitor();
    handler.addMonitor(monitor);

    final StatMonitorNotifier notifier = handler.getStatMonitorNotifier();
    assertTrue(notifier.isAlive());

    waitUntilWaiting(notifier);

    for (int i = 0; i < 20; i++) {
      assertTrue(notifier.isWaiting());
      Thread.sleep(10);
    }
  }
Extracted tests from StatMonitorHandlerTest that require enableMonitorThread
geode-core/src/test/java/org/apache/geode/internal/statistics/StatMonitorHandlerWithEnabledMonitorThreadTest.java