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

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

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

    PooledExecutorWithDMStats executor = (PooledExecutorWithDMStats) executorService;

    assertThat(executor.getCorePoolSize()).isEqualTo(1);
    assertThat(executor.getKeepAliveTime(MINUTES)).isEqualTo(30);
    assertThat(executor.getMaximumPoolSize()).isEqualTo(poolSize);
    assertThat(executor.getQueue()).isInstanceOf(SynchronousQueue.class);
    assertThat(executor.getRejectedExecutionHandler())
        .isInstanceOf(PooledExecutorWithDMStats.BufferHandler.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);
  }
Creates and passes up BlockingQueue. PooledExecutorWithDMStats then creates and passes up
SynchronousQueue
geode-core/src/test/java/org/apache/geode/internal/logging/CoreLoggingExecutorsTest.java