diff --git a/spring-integration-core/src/test/java/org/springframework/integration/dsl/flowservices/FlowServiceTests.java b/spring-integration-core/src/test/java/org/springframework/integration/dsl/flowservices/FlowServiceTests.java index ece56118ad..6311397b52 100644 --- a/spring-integration-core/src/test/java/org/springframework/integration/dsl/flowservices/FlowServiceTests.java +++ b/spring-integration-core/src/test/java/org/springframework/integration/dsl/flowservices/FlowServiceTests.java @@ -156,9 +156,7 @@ public class FlowServiceTests { @Bean public IntegrationFlow testGateway() { - return f -> f.gateway("processChannel", g -> g.replyChannel("replyChannel").async(true)) - .enrichHeaders(headers -> - headers.headerExpression("currentThread", "T (Thread).currentThread().name")); + return f -> f.gateway("processChannel", g -> g.replyChannel("replyChannel").async(true)); } @Bean @@ -166,6 +164,8 @@ public class FlowServiceTests { return IntegrationFlow .from("processChannel") .transform(String::toUpperCase) + .enrichHeaders(headers -> + headers.headerExpression("currentThread", "T (Thread).currentThread().name")) .channel("replyChannel") .get(); }