### Question:
ExecutorServiceHelper { @Nonnull public static EInterrupt shutdownAndWaitUntilAllTasksAreFinished (@Nonnull final ExecutorService aES) { return shutdownAndWaitUntilAllTasksAreFinished (aES, 1, TimeUnit.SECONDS); } private  ExecutorServiceHelper(); @Nonnull static EInterrupt waitUntilAllTasksAreFinished(@Nonnull final ExecutorService aES); @Nonnull static EInterrupt waitUntilAllTasksAreFinished(@Nonnull final ExecutorService aES,
                                                         @Nonnegative final long nTimeout,
                                                         @Nonnull final TimeUnit eUnit); @Nonnull static EInterrupt shutdownAndWaitUntilAllTasksAreFinished(@Nonnull final ExecutorService aES); @Nonnull static EInterrupt shutdownAndWaitUntilAllTasksAreFinished(@Nonnull final ExecutorService aES,
                                                                    @Nonnegative final long nTimeout,
                                                                    @Nonnull final TimeUnit eUnit);  }### Answer:
@Test public void testAll () { final ExecutorService aExecSvc = Executors.newFixedThreadPool (3); aExecSvc.submit ( () -> { }); assertTrue (ExecutorServiceHelper.shutdownAndWaitUntilAllTasksAreFinished (aExecSvc).isNotInterrupted ()); try { ExecutorServiceHelper.shutdownAndWaitUntilAllTasksAreFinished (null); fail (); } catch (final NullPointerException ex) {} }