### Question:
ShutdownThreadsHelper { public static boolean shutdownThread(Thread thread) { return shutdownThread(thread, SHUTDOWN_WAIT_MS); }  static boolean shutdownThread(Thread thread); static boolean shutdownThread(Thread thread,
                                    long timeoutInMilliSeconds); static boolean shutdownExecutorService(ExecutorService service); static boolean shutdownExecutorService(ExecutorService service,
                                        long timeoutInMs);  }### Answer:
@Test (timeout = 3000) public void testShutdownThread() { Thread thread = new Thread(sampleRunnable); thread.start(); boolean ret = ShutdownThreadsHelper.shutdownThread(thread); boolean isTerminated = !thread.isAlive(); assertEquals("Incorrect return value", ret, isTerminated); assertTrue("Thread is not shutdown", isTerminated); }