@Test
  public void newSerialThreadPool() {
    BlockingQueue<Runnable> workQueue = mock(BlockingQueue.class);
    String threadName = "thread";

    ExecutorService executorService = CoreLoggingExecutors
        .newSerialThreadPool(workQueue, threadName, threadInitializer, commandWrapper,
            poolStatHelper, threadsMonitoring);

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

    SerialQueuedExecutorWithDMStats executor = (SerialQueuedExecutorWithDMStats) executorService;

    assertThat(executor.getCorePoolSize()).isEqualTo(1);
    assertThat(executor.getKeepAliveTime(MINUTES)).isEqualTo(1);
    assertThat(executor.getMaximumPoolSize()).isEqualTo(1);
    assertThat(executor.getPoolStatHelper()).isSameAs(poolStatHelper);
    assertThat(executor.getQueue()).isSameAs(workQueue);
    assertThat(executor.getRejectedExecutionHandler())
        .isInstanceOf(PooledExecutorWithDMStats.BlockHandler.class);
    assertThat(executor.getThreadFactory()).isInstanceOf(LoggingThreadFactory.class);

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

    assertThat(thread).isInstanceOf(LoggingThread.class);
    assertThat(thread.getName()).contains(threadName);
  }
Passes in and uses BlockingQueue.

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