@Test void receiveMessage_withoutDefaultTimeout_returnsNull() throws Exception { AmazonSQSAsync amazonSqs = mock(AmazonSQSAsync.class); when(amazonSqs.receiveMessage(new ReceiveMessageRequest("http: .withWaitTimeSeconds(0).withMaxNumberOfMessages(1) .withAttributeNames(QueueMessageChannel.ATTRIBUTE_NAMES) .withMessageAttributeNames("All"))).thenReturn( new ReceiveMessageResult().withMessages(Collections.emptyList())); PollableChannel messageChannel = new QueueMessageChannel(amazonSqs, "http: Message<?> receivedMessage = messageChannel.receive(0); assertThat(receivedMessage).isNull(); }
@Override public Message<String> receive() { return this.receive(0); }
QueueMessageChannel extends AbstractMessageChannel implements PollableChannel { @Override public Message<String> receive() { return this.receive(0); } }
QueueMessageChannel extends AbstractMessageChannel implements PollableChannel { @Override public Message<String> receive() { return this.receive(0); } QueueMessageChannel(AmazonSQSAsync amazonSqs, String queueUrl); }
QueueMessageChannel extends AbstractMessageChannel implements PollableChannel { @Override public Message<String> receive() { return this.receive(0); } QueueMessageChannel(AmazonSQSAsync amazonSqs, String queueUrl); @Override Message<String> receive(); @Override Message<String> receive(long timeout); }
QueueMessageChannel extends AbstractMessageChannel implements PollableChannel { @Override public Message<String> receive() { return this.receive(0); } QueueMessageChannel(AmazonSQSAsync amazonSqs, String queueUrl); @Override Message<String> receive(); @Override Message<String> receive(long timeout);  }