### Question:
FixedThreadPoolExecutor extends AbstractExecutorService { @Override public void shutdown() { myShuttingDown = true; synchronized (myWorkers) { for (Worker worker : myWorkers) { worker.interruptIfIdle(); } } } FixedThreadPoolExecutor(int nThreads);  FixedThreadPoolExecutor(int nThreads, NamedThreadFactory factory, SuppressableRejectedExecutionHandler handler);  FixedThreadPoolExecutor(int nThreads, ThreadFactory factory);  FixedThreadPoolExecutor(int nThreads, ThreadFactory factory, BlockingQueue<Runnable> queue);  FixedThreadPoolExecutor(int nThreads, ThreadFactory factory, BlockingQueue<Runnable> queue,
            RejectedExecutionHandler handler); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override @SuppressFBWarnings(value = "NP_NONNULL_PARAM_VIOLATION", justification = "No ThreadPoolExecutor available to pass.") void execute(Runnable command); BlockingQueue<Runnable> getQueue(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdown(); @Override List<Runnable> shutdownNow();  }### Answer:
@Test public void testShutdown() throws InterruptedException, ExecutionException { ThreadGroup group = createTestThreadGroup(); ThreadFactory factory = new ThreadFactoryImplementation(group); FixedThreadPoolExecutor executor = new FixedThreadPoolExecutor(1, factory); Runnable task1 = EasyMock.createStrictMock(Runnable.class); task1.run(); EasyMock.expectLastCall().andAnswer(new IAnswer<Void>() { @Override public Void answer() throws InterruptedException { Thread.sleep(500); return null; } }); EasyMock.replay(task1); Runnable task2 = EasyMock.createStrictMock(Runnable.class); task2.run(); EasyMock.replay(task2); executor.execute(task1); executor.execute(task2); executor.shutdown(); Assert.assertTrue(executor.awaitTermination(10, TimeUnit.SECONDS)); Thread.yield(); if (group.activeCount() > 0) { Thread.sleep(500); } Assert.assertEquals(0, group.activeCount()); EasyMock.verify(task1); EasyMock.verify(task2); }