@Override
    public void shutdown() {
        shutdown.set(true);
    }
@Test
    public void shutdown() throws Exception {
        ManagedExecutorService executorService = newManagedExecutorService();
        Future<Object> future = executorService.submit(() -> {
            LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(1));
            return null;
        });

        executorService.shutdown();
        assertTrue(executorService.isShutdown());
        future.get();
    }