@Test
  public void newScheduledThreadPool() {
    int poolSize = 10;
    long keepAliveTime = 5000;
    TimeUnit unit = SECONDS;
    String threadName = "thread";

    ExecutorService executorService = CoreLoggingExecutors
        .newScheduledThreadPool(poolSize, keepAliveTime, unit, threadName, threadsMonitoring);

    assertThat(executorService).isInstanceOf(ScheduledThreadPoolExecutorWithKeepAlive.class);

    ScheduledThreadPoolExecutorWithKeepAlive executor =
        (ScheduledThreadPoolExecutorWithKeepAlive) executorService;

    assertThat(executor.getCorePoolSize()).isEqualTo(1);
    assertThat(executor.getDelegateExecutor()).isInstanceOf(ScheduledThreadPoolExecutor.class);
    assertThat(executor.getKeepAliveTime(unit)).isEqualTo(keepAliveTime);
    assertThat(executor.getMaximumPoolSize()).isEqualTo(poolSize);
    assertThat(executor.getQueue()).isInstanceOf(SynchronousQueue.class);
    assertThat(executor.getRejectedExecutionHandler())
        .isInstanceOf(ScheduledThreadPoolExecutorWithKeepAlive.BlockCallerPolicy.class);
    assertThat(executor.getThreadFactory()).isInstanceOf(LoggingThreadFactory.class);

    ScheduledThreadPoolExecutor delegate = executor.getDelegateExecutor();

    assertThat(delegate.getContinueExistingPeriodicTasksAfterShutdownPolicy()).isFalse();
    assertThat(delegate.getExecuteExistingDelayedTasksAfterShutdownPolicy()).isFalse();

    ThreadFactory threadFactory = executor.getThreadFactory();
    Thread thread = threadFactory.newThread(runnable);

    assertThat(thread).isInstanceOf(LoggingThread.class);
    assertThat(thread.getName()).contains(threadName);
  }
Creates, passes up, and uses SynchronousQueue. ScheduledThreadPoolExecutorWithKeepAlive then
creates a ThreadPoolExecutor to delegate to.

<p>
Uses {@code ScheduledThreadPoolExecutorWithKeepAlive.BlockCallerPolicy}.
geode-core/src/test/java/org/apache/geode/internal/logging/CoreLoggingExecutorsTest.java