LazyTraceAsyncCustomizer extends AsyncConfigurerSupport { @Override public Executor getAsyncExecutor() { if (this.delegate.getAsyncExecutor() instanceof LazyTraceExecutor) { return this.delegate.getAsyncExecutor(); } return new LazyTraceExecutor(this.beanFactory, this.delegate.getAsyncExecutor()); } LazyTraceAsyncCustomizer(BeanFactory beanFactory, AsyncConfigurer delegate); @Override Executor getAsyncExecutor(); @Override AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler();  }
@Test public void should_wrap_async_executor_in_trace_version() throws Exception { Executor executor = this.lazyTraceAsyncCustomizer.getAsyncExecutor(); then(executor).isExactlyInstanceOf(LazyTraceExecutor.class); }