@Test
  public void newFixedThreadPoolWithTimeout() {
    int poolSize = 5;
    int keepAliveTime = 2;
    String threadName = "thread";

    ExecutorService executorService = CoreLoggingExecutors
        .newFixedThreadPoolWithTimeout(poolSize, keepAliveTime, MINUTES, queueStatHelper,
            threadName);

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

    ThreadPoolExecutor executor = (ThreadPoolExecutor) executorService;

    assertThat(executor.getCorePoolSize()).isEqualTo(poolSize);
    assertThat(executor.getKeepAliveTime(MINUTES)).isEqualTo(keepAliveTime);
    assertThat(executor.getMaximumPoolSize()).isEqualTo(poolSize);
    assertThat(executor.getQueue()).isInstanceOf(OverflowQueueWithDMStats.class);
    assertThat(executor.getRejectedExecutionHandler())
        .isInstanceOf(ThreadPoolExecutor.AbortPolicy.class);
    assertThat(executor.getThreadFactory()).isInstanceOf(LoggingThreadFactory.class);

    OverflowQueueWithDMStats overflowQueueWithDMStats =
        (OverflowQueueWithDMStats) executor.getQueue();

    assertThat(overflowQueueWithDMStats.getQueueStatHelper()).isSameAs(queueStatHelper);

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

    assertThat(thread).isInstanceOf(LoggingThread.class);
    assertThat(thread.getName()).contains(threadName);
  }
Creates, passes in, and uses OverflowQueueWithDMStats.

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