OPEN - issue INT-1063: MessageStore: correlation and grouping API
https://jira.springsource.org/browse/INT-1063
This commit is contained in:
@@ -16,21 +16,34 @@
|
||||
|
||||
package org.springframework.integration.test.matcher;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.anything;
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.not;
|
||||
import static org.hamcrest.CoreMatchers.notNullValue;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasAllHeaders;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasCorrelationId;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasExpirationDate;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasHeader;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasHeaderKey;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasMessageId;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasSequenceNumber;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasSequenceSize;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.hasTimestamp;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.hamcrest.Matcher;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.springframework.integration.core.Message;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.springframework.integration.test.matcher.HeaderMatcher.*;
|
||||
|
||||
/**
|
||||
* @author Alex Peters
|
||||
* @author Iwein Fuld
|
||||
@@ -146,7 +159,7 @@ public class HeaderMatcherTests {
|
||||
|
||||
@Test
|
||||
public void hasCorrelationId_() throws Exception {
|
||||
Object correlationId = message.getHeaders().getId();
|
||||
UUID correlationId = message.getHeaders().getId();
|
||||
message = MessageBuilder.withPayload("blabla").setCorrelationId(correlationId).build();
|
||||
assertThat(message, hasCorrelationId(correlationId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user