@Override
    @Nonnull
    public <T> Future<T> submit(@Nonnull Callable<T> task) {
        throwRejectedExecutionExceptionIfShutdown();

        try {
            T result = task.call();

            return new CompletedFuture<>(result, null);
        } catch (Exception e) {
            return new CompletedFuture<>(null, e);
        }
    }
@Test
    void testRejectedSubmitCallable() {
        testRejectedExecutionException(testInstance -> testInstance.submit(() -> null));
    }