public void shutdown(final Duration duration) {
        for (final TaskExecutor t: taskExecutors) {
            t.requestShutdown();
        }
        signalTaskExecutors();
        for (final TaskExecutor t: taskExecutors) {
            t.awaitShutdown(duration);
        }
    }
@Test
    public void shouldShutdownTaskExecutors() {
        final Duration duration = mock(Duration.class);
        taskManager.shutdown(duration);

        verify(taskExecutor).requestShutdown();
        verify(taskExecutor).awaitShutdown(duration);
    }