List of usage examples for org.springframework.integration.gateway TestService promise
Mono<Message<?>> promise(String s);
From source file:org.springframework.integration.config.xml.GatewayParserTests.java
@Test public void testMonoGateway() throws Exception { PollableChannel requestChannel = context.getBean("requestChannel", PollableChannel.class); MessageChannel replyChannel = context.getBean("replyChannel", MessageChannel.class); this.startResponder(requestChannel, replyChannel); TestService service = context.getBean("promise", TestService.class); Mono<Message<?>> result = service.promise("foo"); Message<?> reply = result.block(Duration.ofSeconds(1)); assertEquals("foo", reply.getPayload()); assertNotNull(TestUtils.getPropertyValue(context.getBean("&promise"), "asyncExecutor")); }