diff --git a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
index <HASH>..<HASH> 100644
--- a/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
+++ b/spring-cloud-sleuth-core/src/test/java/org/springframework/cloud/sleuth/instrument/async/TraceableExecutorServiceTests.java
@@ -72,12 +72,13 @@ public class TraceableExecutorServiceTests {
 		Tracer tracer = this.tracer;
 		TraceKeys traceKeys = new TraceKeys();
 		SpanNamer spanNamer = new DefaultSpanNamer();
+		ExecutorService executorService = this.executorService;
 
 		// tag::completablefuture[]
 		CompletableFuture<Long> completableFuture = CompletableFuture.supplyAsync(() -> {
 			// perform some logic
 			return 1_000_000L;
-		}, new TraceableExecutorService(Executors.newCachedThreadPool(),
+		}, new TraceableExecutorService(executorService,
 				// 'calculateTax' explicitly names the span - this param is optional
 				tracer, traceKeys, spanNamer, "calculateTax"));
 		// end::completablefuture[]
Added docs with an example of CompletableFuture usage - fixed executor service