@Test public void testSubmitCallableWithException() { Callable<Integer> callable = spy(new MockCallableWithException()); Future<Integer> future = executor.submit(callable); Throwable caught = catchThrowable(() -> future.get()); assertThat(done).isEqualTo(true); assertThat(caught).isInstanceOf(ExecutionException.class); assertThat(caught.getCause()).isEqualTo(handled); assertThat(handled).isEqualTo(exception); List<Event> events = recorder.play(); assertThat(events).hasSize(1); Event event = events.get(0); assertThat(event.getLevel()).isEqualTo("ERROR"); assertThat(event.getMessage()).isEqualTo(ExceptionHandlingAsyncTaskExecutor.EXCEPTION_MESSAGE); assertThat(event.getThrown()).isEqualTo(exception.toString()); }
@Override public Future<?> submit(Runnable task) { return executor.submit(createWrappedRunnable(task)); }
ExceptionHandlingAsyncTaskExecutor implements AsyncTaskExecutor,
    InitializingBean, DisposableBean { @Override public Future<?> submit(Runnable task) { return executor.submit(createWrappedRunnable(task)); } }
ExceptionHandlingAsyncTaskExecutor implements AsyncTaskExecutor,
    InitializingBean, DisposableBean { @Override public Future<?> submit(Runnable task) { return executor.submit(createWrappedRunnable(task)); } ExceptionHandlingAsyncTaskExecutor(AsyncTaskExecutor executor); }
ExceptionHandlingAsyncTaskExecutor implements AsyncTaskExecutor,
    InitializingBean, DisposableBean { @Override public Future<?> submit(Runnable task) { return executor.submit(createWrappedRunnable(task)); } ExceptionHandlingAsyncTaskExecutor(AsyncTaskExecutor executor); @Override void execute(Runnable task); @Override void execute(Runnable task, long startTimeout); @Override Future<?> submit(Runnable task); @Override Future<T> submit(Callable<T> task); @Override void destroy(); @Override void afterPropertiesSet(); }
ExceptionHandlingAsyncTaskExecutor implements AsyncTaskExecutor,
    InitializingBean, DisposableBean { @Override public Future<?> submit(Runnable task) { return executor.submit(createWrappedRunnable(task)); } ExceptionHandlingAsyncTaskExecutor(AsyncTaskExecutor executor); @Override void execute(Runnable task); @Override void execute(Runnable task, long startTimeout); @Override Future<?> submit(Runnable task); @Override Future<T> submit(Callable<T> task); @Override void destroy(); @Override void afterPropertiesSet();  }