diff --git a/org.springframework.integration.test/.classpath b/org.springframework.integration.test/.classpath
new file mode 100644
index 0000000000..01b4aa119b
--- /dev/null
+++ b/org.springframework.integration.test/.classpath
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.springframework.integration.test/.project b/org.springframework.integration.test/.project
new file mode 100644
index 0000000000..b588dbf073
--- /dev/null
+++ b/org.springframework.integration.test/.project
@@ -0,0 +1,23 @@
+
+
+ org.springframework.integration.test
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/org.springframework.integration.test/.springBeans b/org.springframework.integration.test/.springBeans
new file mode 100644
index 0000000000..51529914c5
--- /dev/null
+++ b/org.springframework.integration.test/.springBeans
@@ -0,0 +1,13 @@
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
diff --git a/org.springframework.integration.test/build.xml b/org.springframework.integration.test/build.xml
new file mode 100644
index 0000000000..d4b00fd40e
--- /dev/null
+++ b/org.springframework.integration.test/build.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/org.springframework.integration.test/ivy.xml b/org.springframework.integration.test/ivy.xml
new file mode 100644
index 0000000000..7fd4f519c9
--- /dev/null
+++ b/org.springframework.integration.test/ivy.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/org.springframework.integration.test/src/main/java/org/springframework/integration/test/TestMessage.java b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/TestMessage.java
new file mode 100644
index 0000000000..baf3fd52f1
--- /dev/null
+++ b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/TestMessage.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2002-2007 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.springframework.integration.test;
+
+import org.springframework.integration.message.StringMessage;
+
+/**
+ * @author Mark Fisher
+ */
+@SuppressWarnings("serial")
+public class TestMessage extends StringMessage {
+
+ public TestMessage(String payload) {
+ super("test");
+ }
+
+}
diff --git a/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
new file mode 100644
index 0000000000..6bef0a28e2
--- /dev/null
+++ b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/HeaderMatcher.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2002-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.integration.test.matcher;
+
+import java.util.Map;
+
+import org.hamcrest.Description;
+import org.hamcrest.Factory;
+import org.hamcrest.Matcher;
+import org.junit.Assert;
+import org.junit.internal.matchers.TypeSafeMatcher;
+import org.springframework.integration.core.Message;
+import org.springframework.integration.core.MessageHeaders;
+
+/**
+ *
Are the {@link MessageHeaders} of a {@link Message} containing any entry
+ * or multiple that match?
+ *
+ *
+ *
+ * For example using {@link Assert#assertThat(Object, Matcher)} for a single
+ * entry:
+ *
+ *
+ * ANY_HEADER_KEY = "foo";
+ * ANY_HEADER_VALUE = "bar";
+ * assertThat(message, hasEntry(ANY_HEADER_KEY, ANY_HEADER_VALUE));
+ * assertThat(message, hasEntry(ANY_HEADER_KEY, is(String.class)));
+ * assertThat(message, hasEntry(ANY_HEADER_KEY, notNullValue()));
+ * assertThat(message, hasEntry(ANY_HEADER_KEY, is(ANY_HEADER_VALUE)));
+ *
+ *
+ * For multiple entries to match all:
+ *
+ *
+ * Map<String, Object> expectedInHeaderMap = new HashMap<String, Object>();
+ * expectedInHeaderMap.put(ANY_HEADER_KEY, ANY_HEADER_VALUE);
+ * expectedInHeaderMap.put(OTHER_HEADER_KEY, is(OTHER_HEADER_VALUE));
+ * assertThat(message, HeaderMatcher.hasAllEntries(expectedInHeaderMap));
+ *
+ *
+ *
+ * For a single key:
+ *
+ *
+ * ANY_HEADER_KEY = "foo";
+ * assertThat(message, HeaderMatcher.hasKey(ANY_HEADER_KEY));
+ *
+ *
+ *
+ * @author Alex Peters
+ * @author Iwein Fuld
+ *
+ */
+public class HeaderMatcher extends TypeSafeMatcher> {
+
+ private final Matcher> matcher;
+
+ /**
+ * @param matcher
+ */
+ HeaderMatcher(Matcher> matcher) {
+ super();
+ this.matcher = matcher;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public boolean matchesSafely(Message> item) {
+ return matcher.matches(item.getHeaders());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void describeTo(Description description) {
+ description.appendText("a Message with Headers containing ").appendDescriptionOf(matcher);
+
+ }
+
+ @Factory
+ public static Matcher> hasHeader(String key, T value) {
+ return new HeaderMatcher(MapContentMatchers.hasEntry(key, value));
+ }
+
+ @Factory
+ public static Matcher> hasHeader(String key, Matcher> valueMatcher) {
+ return new HeaderMatcher(MapContentMatchers.hasEntry(key, valueMatcher));
+ }
+
+ @Factory
+ public static Matcher> hasHeaderKey(String key) {
+ return new HeaderMatcher(MapContentMatchers.hasKey(key));
+ }
+
+ @Factory
+ public static Matcher> hasAllHeaders(Map entries) {
+ return new HeaderMatcher(MapContentMatchers.hasAllEntries(entries));
+ }
+}
\ No newline at end of file
diff --git a/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java
new file mode 100644
index 0000000000..2e0c17c532
--- /dev/null
+++ b/org.springframework.integration.test/src/main/java/org/springframework/integration/test/matcher/MapContentMatchers.java
@@ -0,0 +1,143 @@
+/*
+ * Copyright 2002-2008 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.integration.test.matcher;
+
+import static org.hamcrest.CoreMatchers.anything;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.hamcrest.Description;
+import org.hamcrest.Factory;
+import org.hamcrest.Matcher;
+import org.hamcrest.core.AllOf;
+import org.hamcrest.core.IsEqual;
+import org.junit.internal.matchers.TypeSafeMatcher;
+
+/**
+ * Matchers that examine the contents of a {@link Map}.
+ *
+ * It is possible to match a single entry by value or matcher like this:
+ *
+ *
+ *
+ * assertThat(map, hasEntry(SOME_KEY, is(SOME_VALUE)));
+ * assertThat(map, hasEntry(SOME_KEY, is(String.class)));
+ * assertThat(map, hasEntry(SOME_KEY, notNullValue()));
+ *
+ *
+ *
+ * It's also possible to match multiple entries in a map:
+ *
+ *
+ *
+ * Map<String, Object> expectedInMap = new HashMap<String, Object>();
+ * expectedInMap.put(SOME_KEY, SOME_VALUE);
+ * expectedInMap.put(OTHER_KEY, is(OTHER_VALUE));
+ * assertThat(map, hasAllEntries(expectedInMap));
+ *
+ *
+ * If you only need to verify the existence of a key:
+ *
+ *
+ * assertThat(map, hasKey(SOME_KEY));
+ *
+ *
+ * @author Alex Peters
+ * @author Iwein Fuld
+ *
+ */
+public class MapContentMatchers extends
+ TypeSafeMatcher