### Question:
SpringCloudFunctionInvoker implements FunctionInvoker, Closeable { @Override public Optional<OutputEvent> tryInvoke(InvocationContext ctx, InputEvent evt) { SpringCloudMethod method = loader.getFunction(); Object[] userFunctionParams = coerceParameters(ctx, method, evt); Object result = tryInvoke(method, userFunctionParams); return coerceReturnValue(ctx, method, result); } SpringCloudFunctionInvoker(SpringCloudFunctionLoader loader);  SpringCloudFunctionInvoker(Class<?> configClass); @Override Optional<OutputEvent> tryInvoke(InvocationContext ctx, InputEvent evt); @Override void close();  }### Answer:
@Test public void invokesFunctionWithFluxOfMultipleItems() { SpringCloudFunction fnWrapper = new SpringCloudFunction(x -> x, new SimpleFunctionInspector()); Object result = invoker.tryInvoke(fnWrapper, new Object[]{ Arrays.asList("hello", "world") }); assertThat(result).isInstanceOf(List.class); assertThat((List) result).containsSequence("hello", "world"); }
@Test public void invokesFunctionWithEmptyFlux() { SpringCloudFunction fnWrapper = new SpringCloudFunction(x -> x, new SimpleFunctionInspector()); Object result = invoker.tryInvoke(fnWrapper, new Object[0]); assertThat(result).isNull(); }
@Test public void invokesFunctionWithFluxOfSingleItem() { SpringCloudFunction fnWrapper = new SpringCloudFunction(x -> x, new SimpleFunctionInspector()); Object result = invoker.tryInvoke(fnWrapper, new Object[]{ "hello" }); assertThat(result).isInstanceOf(String.class); assertThat(result).isEqualTo("hello"); }