diff --git a/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/BeanFactoryFunctionCatalogTests.java b/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/BeanFactoryFunctionCatalogTests.java index 95153c14e..de5241060 100644 --- a/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/BeanFactoryFunctionCatalogTests.java +++ b/spring-cloud-function-context/src/test/java/org/springframework/cloud/function/context/config/BeanFactoryFunctionCatalogTests.java @@ -179,6 +179,20 @@ public class BeanFactoryFunctionCatalogTests { processor.lookup("supplier|consumer|z"); } + @Test + public void composeSupplierAndMultipleFunctions() { + Supplier s = () -> "hello"; + processor.register(new FunctionRegistration<>(s, "supplier")); + Function uppercase = x -> x.toUpperCase(); + processor.register(new FunctionRegistration<>(uppercase, "uppercase")); + Function concat = x -> x + x; + processor.register(new FunctionRegistration<>(concat, "concat")); + + Supplier> f = processor.lookup("supplier|uppercase|concat"); + + assertThat(f.get().blockFirst()).isEqualTo("HELLOHELLO"); + } + protected static class Source implements Supplier { @Override