Fixed test
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e244c33e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e244c33e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e244c33e Branch: refs/heads/master Commit: e244c33e3dbcc7efcf0b3b6bc3d30ba362434cb3 Parents: d65802f Author: Claus Ibsen <davscl...@apache.org> Authored: Tue Mar 7 09:31:44 2017 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Mar 7 09:31:44 2017 +0100 ---------------------------------------------------------------------- .../camel/component/rest/FromRestDefaultValueTest.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/e244c33e/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java ---------------------------------------------------------------------- diff --git a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java index 14ce5e5..47cd6c1 100644 --- a/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java +++ b/camel-core/src/test/java/org/apache/camel/component/rest/FromRestDefaultValueTest.java @@ -31,15 +31,22 @@ public class FromRestDefaultValueTest extends ContextTestSupport { } public void testDefaultValue() throws Exception { - // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory + getMockEndpoint("mock:bye").expectedBodiesReceived("Hello World"); getMockEndpoint("mock:bye").expectedHeaderReceived("kind", "customer"); + + // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory template.sendBody("seda:get-say-bye", "Hello World"); - assertMockEndpointsSatisfied(); - resetMocks(); + assertMockEndpointsSatisfied(); + } + public void testDefaultValueOverride() throws Exception { + getMockEndpoint("mock:bye").expectedBodiesReceived("Bye World"); getMockEndpoint("mock:bye").expectedHeaderReceived("kind", "admin"); + + // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory template.sendBodyAndHeader("seda:get-say-bye", "Bye World", "kind", "admin"); + assertMockEndpointsSatisfied(); }