This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4b39570892717f49a941da13355fdf8b70a7b749
Author: Andrea Cosentino <anco...@gmail.com>
AuthorDate: Thu Oct 24 13:33:03 2019 +0200

    Regen docs
---
 .../modules/ROOT/pages/seda-component.adoc         | 60 +++++++++++++++++++++-
 1 file changed, 58 insertions(+), 2 deletions(-)

diff --git a/docs/components/modules/ROOT/pages/seda-component.adoc 
b/docs/components/modules/ROOT/pages/seda-component.adoc
index 5f5b971..c9fc671 100644
--- a/docs/components/modules/ROOT/pages/seda-component.adoc
+++ b/docs/components/modules/ROOT/pages/seda-component.adoc
@@ -239,14 +239,70 @@ to the original caller.
 
 [source,java]
 ----
-include::{examplesdir}/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaAsyncRouteTest.java[tags=example]
+    @Test
+    public void testSendAsync() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+
+        // START SNIPPET: e2
+        Object out = template.requestBody("direct:start", "Hello World");
+        assertEquals("OK", out);
+        // END SNIPPET: e2
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            // START SNIPPET: e1
+            public void configure() throws Exception {
+                from("direct:start")
+                    // send it to the seda queue that is async
+                    .to("seda:next")
+                    // return a constant response
+                    .transform(constant("OK"));
+
+                from("seda:next").to("mock:result");
+            }
+            // END SNIPPET: e1
+        };
+    }
 ----
 
 Here we send a Hello World message and expects the reply to be OK.
 
 [source,java]
 ----
-include::{examplesdir}/core/camel-core/src/test/java/org/apache/camel/component/seda/SedaAsyncRouteTest.java[tags=example]
+    @Test
+    public void testSendAsync() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedBodiesReceived("Hello World");
+
+        // START SNIPPET: e2
+        Object out = template.requestBody("direct:start", "Hello World");
+        assertEquals("OK", out);
+        // END SNIPPET: e2
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            // START SNIPPET: e1
+            public void configure() throws Exception {
+                from("direct:start")
+                    // send it to the seda queue that is async
+                    .to("seda:next")
+                    // return a constant response
+                    .transform(constant("OK"));
+
+                from("seda:next").to("mock:result");
+            }
+            // END SNIPPET: e1
+        };
+    }
 ----
 
 

Reply via email to