You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bu...@apache.org on 2017/08/25 08:22:03 UTC

svn commit: r1017260 [32/40] - in /websites/production/camel/content: ./ cache/

Modified: websites/production/camel/content/spring-testing.html
==============================================================================
--- websites/production/camel/content/spring-testing.html (original)
+++ websites/production/camel/content/spring-testing.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: Spring Testing
@@ -86,169 +75,51 @@
 	<tbody>
         <tr>
         <td valign="top" width="100%">
-<div class="wiki-content maincontent"><h2 id="SpringTesting-SpringTesting">Spring Testing</h2><p><a shape="rect" href="testing.html">Testing</a> is a crucial part of any development or integration work. The Spring Framework offers a number of features that makes it easy to test while using Spring for Inversion of Control which works with JUnit 3.x, JUnit 4.x, and <a shape="rect" class="external-link" href="http://testng.org" rel="nofollow">TestNG</a>.</p><p>We can use Spring for IoC and the Camel <a shape="rect" href="mock.html">Mock</a> and <a shape="rect" href="test.html">Test</a> endpoints to create sophisticated integration/unit tests that are easy to run and debug inside your IDE. &#160;There are three supported approaches for testing with Spring in Camel.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Testing Frameworks Supported</p></th><t
 h colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required Camel Test Dependencies</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>CamelSpringTestSupport</code></strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated)</li><li>JUnit 4.x</li><li>TestNG - <strong>Camel 2.8</strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provided by:</p><ul><li><strong><code>org.apache.camel.test.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul><p>These base classes provide <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with&#160;the simple&#160;<strong><code>CamelTestSupport</code></strong> classes from&#1
 60;<a shape="rect" href="camel-test.html">Camel Test</a>&#160;but do not support Spring annotations on the test class such as <strong><code>@Autowired</code></strong>,&#160;<strong><code>@DirtiesContext</code></strong>, and&#160;<strong><code>@ContextConfiguration</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated) -&#160;<code>camel-test-spring</code></li><li>JUnit 4.x&#160;-&#160;<code>camel-test-spring</code></li><li>TestNG -&#160;<code>camel-test-ng</code></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Plain Spring Test</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x</li><li>JUnit 4.x</li><li>TestNG</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Either extend the abstract base classes:</p><ul><li><strong><code>org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests</code></strong></li><li><strong><code>org.springframework.test.context.
 junit38.AbstractJUnit4SpringContextTests</code></strong></li><li>etc.</li></ul><p>provided in Spring Test or use the Spring Test JUnit4 runner. &#160;</p><p>These approaches support both the Camel annotations and Spring annotations. However, they do NOT have <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with:</p><ul><li><strong><code>org.apache.camel.test.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated) - None</li><li>JUnit 4.x&#160;- None</li><li>TestNG - None</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Camel Enhanced Spring Test</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 4.x - <strong>Camel 2.10</strong></li><li>TestNG - <st
 rong>Camel 2.10</strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Either:</p><ul><li>use the&#160;<strong><code>org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner</code></strong> runner with the&#160;<strong><code>@RunWith</code></strong> annotation,</li><li>or extend&#160;<strong><code>org.apache.camel.testng.AbstractCamelTestNGSpringContextTests</code></strong> to enable <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with&#160;<strong><code>org.apache.camel.test.CamelTestSupport</code></strong> and&#160;<strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>. These classes support the full suite of Spring Test annotations such as&#160;<strong><code>@Autowired</code></strong>,&#160;<strong><code>@DirtiesContext</code></strong>, and&#160;<strong><code>@ContextConfiguration</code></strong>.</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JUnit 3.x (deprecated)
  -&#160;<code>camel-test-spring</code></p><p>JUnit 4.x&#160;-&#160;<code>camel-test-spring</code></p><p>TestNG -&#160;<code>camel-test-ng</code></p></td></tr></tbody></table></div><h3 id="SpringTesting-CamelSpringTestSupport">CamelSpringTestSupport</h3><p>The following Spring test support classes:</p><ul><li><strong><code>org.apache.camel.test.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong>, and</li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul><p>extend their non-Spring aware counterparts:</p><ul><li><strong><code>org.apache.camel.test.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>, and&#160;</li><li><strong><code>org.apache.camel.testng.CamelTestSupport</code></strong></li></ul><p>and deliver integration with Spring into your test classes. &#160;</p><p>Instead of&#160;instantiating&#160;th
 e&#160;<strong><code>CamelContext</code></strong> and routes programmatically, these classes rely on a Spring context to wire the needed components together. &#160;If your test extends one of these classes, you must provide the Spring context by implementing the following method.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[protected abstract AbstractApplicationContext createApplicationContext();
-]]></script>
-</div></div><p>You are responsible for the instantiation of the Spring context in the method implementation. &#160;All of the features available in the non-Spring aware counterparts from <a shape="rect" href="camel-test.html">Camel Test</a> are available in your test.</p><h3 id="SpringTesting-PlainSpringTest">Plain Spring Test</h3><p>In this approach, your test classes directly inherit from the Spring Test abstract test classes or use the JUnit 4.x test runner provided in Spring Test. &#160;This approach supports&#160;dependency&#160;injection into your test class and the full suite of Spring Test annotations. However, it does not support the features provided by the&#160;<strong><code>CamelSpringTestSupport</code></strong> classes.</p><h4 id="SpringTesting-PlainSpringTestusingJUnit3.xwithXMLConfigExample">Plain Spring Test using JUnit 3.x with XML Config Example</h4><p>Here is a simple unit test using JUnit 3.x support from Spring Test using&#160;<a shape="rect" class="external-lin
 k" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java">XML Config</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-// tag::example[]
-@ContextConfiguration
-public class FilterTest extends SpringRunWithTestSupport {
-
-    @EndpointInject(uri = &quot;mock:result&quot;)
-    protected MockEndpoint resultEndpoint;
-
-    @Produce(uri = &quot;direct:start&quot;)
-    protected ProducerTemplate template;
-
-    @DirtiesContext
-    @Test
-    public void testSendMatchingMessage() throws Exception {
-        String expectedBody = &quot;&lt;matched/&gt;&quot;;
-
-        resultEndpoint.expectedBodiesReceived(expectedBody);
-
-        template.sendBodyAndHeader(expectedBody, &quot;foo&quot;, &quot;bar&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @DirtiesContext
-    @Test
-    public void testSendNotMatchingMessage() throws Exception {
-        resultEndpoint.expectedMessageCount(0);
-
-        template.sendBodyAndHeader(&quot;&lt;notMatched/&gt;&quot;, &quot;foo&quot;, &quot;notMatchedHeaderValue&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-}
-// end::example[]
-]]></script>
-</div></div>Notice that we use&#160;<strong><code>@DirtiesContext</code></strong> on the test methods to force&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a>&#160;to automatically reload the&#160;<a shape="rect" href="camelcontext.html">CamelContext</a>&#160;after each test method - this ensures that the tests don't clash with each other, e.g., one test method sending to an endpoint that is then reused in another test method.<p>Also notice the use of&#160;<strong><code>@ContextConfiguration</code></strong> to indicate that by default we should look for the file <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/patterns/FilterTest-context.xml">FilterTest-context.xml on the classpath</a>&#160;to configure the test case. The test context looks like:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- tag::example[] --&gt;
-&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
-       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-       xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
-       xsi:schemaLocation=&quot;
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    &quot;&gt;
-
-  &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;route&gt;
-      &lt;from uri=&quot;direct:start&quot;/&gt;
-      &lt;filter&gt;
-        &lt;xpath&gt;$foo = &#39;bar&#39;&lt;/xpath&gt;
-        &lt;to uri=&quot;mock:result&quot;/&gt;
-      &lt;/filter&gt;
-    &lt;/route&gt;
-  &lt;/camelContext&gt;
-
-&lt;/beans&gt;
-&lt;!-- end::example[] --&gt;
-]]></script>
-</div></div>This test will load a Spring XML configuration file called <strong><code>FilterTest-context.xml</code></strong> from the classpath in the same package structure as the&#160;<strong><code>FilterTest</code></strong> class and initialize it along with any Camel routes we define inside it, then inject the <strong><code>CamelContext </code></strong>instance into our test case.<p>For instance, like this maven folder layout:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[src/test/java/org/apache/camel/spring/patterns/FilterTest.java
+<div class="wiki-content maincontent"><h2 id="SpringTesting-SpringTesting">Spring Testing</h2><p><a shape="rect" href="testing.html">Testing</a> is a crucial part of any development or integration work. The Spring Framework offers a number of features that makes it easy to test while using Spring for Inversion of Control which works with JUnit 3.x, JUnit 4.x, and <a shape="rect" class="external-link" href="http://testng.org" rel="nofollow">TestNG</a>.</p><p>We can use Spring for IoC and the Camel <a shape="rect" href="mock.html">Mock</a> and <a shape="rect" href="test.html">Test</a> endpoints to create sophisticated integration/unit tests that are easy to run and debug inside your IDE. &#160;There are three supported approaches for testing with Spring in Camel.</p><div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Name</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Testing Frameworks Supported</p></th><t
 h colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Required Camel Test Dependencies</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><strong><code>CamelSpringTestSupport</code></strong></p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated)</li><li>JUnit 4.x</li><li>TestNG - <strong>Camel 2.8</strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Provided by:</p><ul><li><strong><code>org.apache.camel.test.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul><p>These base classes provide <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with&#160;the simple&#160;<strong><code>CamelTestSupport</code></strong> classes from&#1
 60;<a shape="rect" href="camel-test.html">Camel Test</a>&#160;but do not support Spring annotations on the test class such as <strong><code>@Autowired</code></strong>,&#160;<strong><code>@DirtiesContext</code></strong>, and&#160;<strong><code>@ContextConfiguration</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated) -&#160;<code>camel-test-spring</code></li><li>JUnit 4.x&#160;-&#160;<code>camel-test-spring</code></li><li>TestNG -&#160;<code>camel-test-ng</code></li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Plain Spring Test</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x</li><li>JUnit 4.x</li><li>TestNG</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Either extend the abstract base classes:</p><ul><li><strong><code>org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests</code></strong></li><li><strong><code>org.springframework.test.context.
 junit38.AbstractJUnit4SpringContextTests</code></strong></li><li>etc.</li></ul><p>provided in Spring Test or use the Spring Test JUnit4 runner. &#160;</p><p>These approaches support both the Camel annotations and Spring annotations. However, they do NOT have <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with:</p><ul><li><strong><code>org.apache.camel.test.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 3.x (deprecated) - None</li><li>JUnit 4.x&#160;- None</li><li>TestNG - None</li></ul></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p>Camel Enhanced Spring Test</p></td><td colspan="1" rowspan="1" class="confluenceTd"><ul><li>JUnit 4.x - <strong>Camel 2.10</strong></li><li>TestNG - <st
 rong>Camel 2.10</strong></li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Either:</p><ul><li>use the&#160;<strong><code>org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner</code></strong> runner with the&#160;<strong><code>@RunWith</code></strong> annotation,</li><li>or extend&#160;<strong><code>org.apache.camel.testng.AbstractCamelTestNGSpringContextTests</code></strong> to enable <a shape="rect" href="camel-test.html#CamelTest-FeaturesProvidedbyCamelTestSupport">feature parity</a> with&#160;<strong><code>org.apache.camel.test.CamelTestSupport</code></strong> and&#160;<strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>. These classes support the full suite of Spring Test annotations such as&#160;<strong><code>@Autowired</code></strong>,&#160;<strong><code>@DirtiesContext</code></strong>, and&#160;<strong><code>@ContextConfiguration</code></strong>.</li></ul></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JUnit 3.x (deprecated)
  -&#160;<code>camel-test-spring</code></p><p>JUnit 4.x&#160;-&#160;<code>camel-test-spring</code></p><p>TestNG -&#160;<code>camel-test-ng</code></p></td></tr></tbody></table></div><h3 id="SpringTesting-CamelSpringTestSupport">CamelSpringTestSupport</h3><p>The following Spring test support classes:</p><ul><li><strong><code>org.apache.camel.test.CamelSpringTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelSpringTestSupport</code></strong>, and</li><li><strong><code>org.apache.camel.testng.CamelSpringTestSupport</code></strong></li></ul><p>extend their non-Spring aware counterparts:</p><ul><li><strong><code>org.apache.camel.test.CamelTestSupport</code></strong></li><li><strong><code>org.apache.camel.test.junit4.CamelTestSupport</code></strong>, and&#160;</li><li><strong><code>org.apache.camel.testng.CamelTestSupport</code></strong></li></ul><p>and deliver integration with Spring into your test classes. &#160;</p><p>Instead of&#160;instantiating&#160;th
 e&#160;<strong><code>CamelContext</code></strong> and routes programmatically, these classes rely on a Spring context to wire the needed components together. &#160;If your test extends one of these classes, you must provide the Spring context by implementing the following method.</p><parameter ac:name="language">java</parameter><plain-text-body>protected abstract AbstractApplicationContext createApplicationContext();
+</plain-text-body><p>You are responsible for the instantiation of the Spring context in the method implementation. &#160;All of the features available in the non-Spring aware counterparts from <a shape="rect" href="camel-test.html">Camel Test</a> are available in your test.</p><h3 id="SpringTesting-PlainSpringTest">Plain Spring Test</h3><p>In this approach, your test classes directly inherit from the Spring Test abstract test classes or use the JUnit 4.x test runner provided in Spring Test. &#160;This approach supports&#160;dependency&#160;injection into your test class and the full suite of Spring Test annotations. However, it does not support the features provided by the&#160;<strong><code>CamelSpringTestSupport</code></strong> classes.</p><h4 id="SpringTesting-PlainSpringTestusingJUnit3.xwithXMLConfigExample">Plain Spring Test using JUnit 3.x with XML Config Example</h4><p>Here is a simple unit test using JUnit 3.x support from Spring Test using&#160;<a shape="rect" class="extern
 al-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java">XML Config</a>.<plain-text-body>{snippet:lang=java|id=example|url=camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/patterns/FilterTest.java}</plain-text-body>Notice that we use&#160;<strong><code>@DirtiesContext</code></strong> on the test methods to force&#160;<a shape="rect" href="spring-testing.html">Spring Testing</a>&#160;to automatically reload the&#160;<a shape="rect" href="camelcontext.html">CamelContext</a>&#160;after each test method - this ensures that the tests don't clash with each other, e.g., one test method sending to an endpoint that is then reused in another test method.</p><p>Also notice the use of&#160;<strong><code>@ContextConfiguration</code></strong> to indicate that by default we should look for the file <a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk
 /components/camel-spring/src/test/resources/org/apache/camel/spring/patterns/FilterTest-context.xml">FilterTest-context.xml on the classpath</a>&#160;to configure the test case. The test context looks like:<plain-text-body>{snippet:lang=xml|id=example|url=camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/patterns/FilterTest-context.xml}</plain-text-body>This test will load a Spring XML configuration file called <strong><code>FilterTest-context.xml</code></strong> from the classpath in the same package structure as the&#160;<strong><code>FilterTest</code></strong> class and initialize it along with any Camel routes we define inside it, then inject the <strong><code>CamelContext </code></strong>instance into our test case.</p><p>For instance, like this maven folder layout:</p><plain-text-body>src/test/java/org/apache/camel/spring/patterns/FilterTest.java
 src/test/resources/org/apache/camel/spring/patterns/FilterTest-context.xml
-]]></script>
-</div></div><h4 id="SpringTesting-PlainSpringTestUsingJUnit4.xWithJavaConfigExample">Plain Spring Test Using JUnit 4.x With Java Config Example</h4><p>You can completely avoid using an XML configuration file by using <a shape="rect" href="spring-java-config.html">Spring Java Config</a>. &#160;Here is a unit test using JUnit 4.x support from Spring Test using&#160;<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java">Java Config</a>.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-// tag::example[]
-@RunWith(CamelSpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = {FilterTest.ContextConfig.class}, loader = CamelSpringDelegatingTestContextLoader.class)
-public class FilterTest extends AbstractJUnit4SpringContextTests {
-
-    @EndpointInject(uri = &quot;mock:result&quot;)
-    protected MockEndpoint resultEndpoint;
-
-    @Produce(uri = &quot;direct:start&quot;)
-    protected ProducerTemplate template;
-
-    @DirtiesContext
-    @Test
-    public void testSendMatchingMessage() throws Exception {
-        String expectedBody = &quot;&lt;matched/&gt;&quot;;
-
-        resultEndpoint.expectedBodiesReceived(expectedBody);
-
-        template.sendBodyAndHeader(expectedBody, &quot;foo&quot;, &quot;bar&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @DirtiesContext
-    @Test
-    public void testSendNotMatchingMessage() throws Exception {
-        resultEndpoint.expectedMessageCount(0);
-
-        template.sendBodyAndHeader(&quot;&lt;notMatched/&gt;&quot;, &quot;foo&quot;, &quot;notMatchedHeaderValue&quot;);
-
-        resultEndpoint.assertIsSatisfied();
-    }
-
-    @Configuration
-    public static class ContextConfig extends SingleRouteCamelConfiguration {
-        @Bean
-        public RouteBuilder route() {
-            return new RouteBuilder() {
-                public void configure() {
-                    from(&quot;direct:start&quot;).filter(header(&quot;foo&quot;).isEqualTo(&quot;bar&quot;)).to(&quot;mock:result&quot;);
-                }
-            };
-        }
-    }
-}
-// end::example[]
-]]></script>
-</div></div>This is similar to the XML Config example above except that there is no XML file and instead the nested <strong><code>ContextConfig</code></strong> class does all of the configuration; so your entire test case is contained in a single Java class. We currently have to reference by class name this class in the <strong><code>@ContextConfiguration</code></strong> which is a bit ugly. Please vote for <a shape="rect" class="external-link" href="http://jira.springframework.org/browse/SJC-238" rel="nofollow">SJC-238</a> to address this and make Spring Test work more cleanly with Spring JavaConfig.<h4 id="SpringTesting-PlainSpringTestUsingJUnit4.0.xRunnerWithXMLConfig">Plain Spring Test Using JUnit 4.0.x Runner With XML Config</h4><p>You can avoid extending Spring classes by using the&#160;<strong><code>SpringJUnit4ClassRunner</code></strong> provided by Spring Test. &#160;This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capab
 ilities of Spring Test.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This is for Spring 4.0.x. If you use Spring 4.1 or newer, then see the next section.</p></div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@RunWith(SpringJUnit4ClassRunner.class)
+</plain-text-body><h4 id="SpringTesting-PlainSpringTestUsingJUnit4.xWithJavaConfigExample">Plain Spring Test Using JUnit 4.x With Java Config Example</h4><p>You can completely avoid using an XML configuration file by using <a shape="rect" href="spring-java-config.html">Spring Java Config</a>. &#160;Here is a unit test using JUnit 4.x support from Spring Test using&#160;<a shape="rect" class="external-link" href="http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java">Java Config</a>.<plain-text-body>{snippet:lang=java|id=example|url=camel/trunk/components/camel-spring-javaconfig/src/test/java/org/apache/camel/spring/javaconfig/patterns/FilterTest.java}</plain-text-body>This is similar to the XML Config example above except that there is no XML file and instead the nested <strong><code>ContextConfig</code></strong> class does all of the configuration; so your entire test case is containe
 d in a single Java class. We currently have to reference by class name this class in the <strong><code>@ContextConfiguration</code></strong> which is a bit ugly. Please vote for <a shape="rect" class="external-link" href="http://jira.springframework.org/browse/SJC-238" rel="nofollow">SJC-238</a> to address this and make Spring Test work more cleanly with Spring JavaConfig.</p><h4 id="SpringTesting-PlainSpringTestUsingJUnit4.0.xRunnerWithXMLConfig">Plain Spring Test Using JUnit 4.0.x Runner With XML Config</h4><p>You can avoid extending Spring classes by using the&#160;<strong><code>SpringJUnit4ClassRunner</code></strong> provided by Spring Test. &#160;This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capabilities of Spring Test.</p><rich-text-body><p>This is for Spring 4.0.x. If you use Spring 4.1 or newer, then see the next section.</p></rich-text-body><parameter ac:name="language">java</parameter><plain-text-body>@RunWith(Spring
 JUnit4ClassRunner.class)
 @ContextConfiguration
 public class MyCamelTest {
-    @Autowired
-    protected CamelContext camelContext;
+&#160; &#160; @Autowired
+&#160; &#160; protected CamelContext camelContext;
 
-    @EndpointInject(uri = &quot;mock:foo&quot;)
-    protected MockEndpoint foo;
+&#160; &#160; @EndpointInject(uri = "mock:foo")
+&#160; &#160; protected MockEndpoint foo;
 
     @Test
     @DirtiesContext
-    public void testMocksAreValid() throws Exception {
-        // ...       
+&#160; &#160; public void testMocksAreValid() throws Exception {
+        // ...&#160; &#160; &#160; &#160;
 
-        foo.message(0).header(&quot;bar&quot;).isEqualTo(&quot;ABC&quot;);
-        MockEndpoint.assertIsSatisfied(camelContext);
-    }
+&#160; &#160; &#160; &#160; foo.message(0).header("bar").isEqualTo("ABC");
+&#160; &#160; &#160; &#160; MockEndpoint.assertIsSatisfied(camelContext);
+&#160; &#160; }
 }
-]]></script>
-</div></div><h4 id="SpringTesting-PlainSpringTestUsingJUnit4.1.xRunnerWithXMLConfig">Plain Spring Test Using JUnit 4.1.x Runner With XML Config</h4><p>You can avoid extending Spring classes by using the&#160;<strong><code>SpringJUnit4ClassRunner</code></strong> provided by Spring Test. &#160;This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capabilities of Spring Test.</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>From <strong>Spring 4.1</strong>, you need to use the&#160;<strong><code>@BootstrapWith</code></strong> annotation to configure it to use Camel testing, as shown below.</p></div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@RunWith(CamelSpringJUnit4ClassRunner.class)
+</plain-text-body><h4 id="SpringTesting-PlainSpringTestUsingJUnit4.1.xRunnerWithXMLConfig">Plain Spring Test Using JUnit 4.1.x Runner With XML Config</h4><p>You can avoid extending Spring classes by using the&#160;<strong><code>SpringJUnit4ClassRunner</code></strong> provided by Spring Test. &#160;This custom JUnit runner means you are free to choose your own class hierarchy while retaining all the capabilities of Spring Test.</p><rich-text-body><p>From <strong>Spring 4.1</strong>, you need to use the&#160;<strong><code>@BootstrapWith</code></strong> annotation to configure it to use Camel testing, as shown below.</p></rich-text-body><parameter ac:name="language">java</parameter><plain-text-body>@RunWith(CamelSpringJUnit4ClassRunner.class)
 @BootstrapWith(CamelTestContextBootstrapper.class)
 @ContextConfiguration
 public class MyCamelTest {
-    @Autowired
-    protected CamelContext camelContext;
+&#160; &#160; @Autowired
+&#160; &#160; protected CamelContext camelContext;
 
-    @EndpointInject(uri = &quot;mock:foo&quot;)
-    protected MockEndpoint foo;
+&#160; &#160; @EndpointInject(uri = "mock:foo")
+&#160; &#160; protected MockEndpoint foo;
 
     @Test
     @DirtiesContext
-    public void testMocksAreValid() throws Exception {
-        // ...       
+&#160; &#160; public void testMocksAreValid() throws Exception {
+        // ...&#160; &#160; &#160; &#160;
 
-        foo.message(0).header(&quot;bar&quot;).isEqualTo(&quot;ABC&quot;);
-        MockEndpoint.assertIsSatisfied(camelContext);
-    }
+&#160; &#160; &#160; &#160; foo.message(0).header("bar").isEqualTo("ABC");
+&#160; &#160; &#160; &#160; MockEndpoint.assertIsSatisfied(camelContext);
+&#160; &#160; }
 }
-]]></script>
-</div></div><h3 id="SpringTesting-CamelEnhancedSpringTest"><span style="line-height: 1.5625;">Camel Enhanced Spring Test</span></h3><p>Using the <strong><code>org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner</code></strong> runner with the&#160;<strong><code>@RunWith</code></strong> annotation or extending&#160;<strong><code>org.apache.camel.testng.AbstractCamelTestNGSpringContextTests</code></strong> provides the full feature set of Spring Test with support for the feature set provided in the&#160;<strong><code>CamelTestSupport</code></strong> classes. &#160;</p><p>A number of Camel specific annotations have been developed in order to provide for declarative manipulation of the Camel context(s) involved in the test. &#160;These annotations free your test classes from having to inherit from the&#160;<strong><code>CamelSpringTestSupport</code></strong> classes and also reduce the amount of code required to customize the tests.</p><div class="table-wrap"><table class="conflue
 nceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Annotation Class</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Applies To</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavioir If Not Present</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavior If Present</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.DisableJmx</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates if JMX should be globally disabled in the CamelContexts that are bootstrapped &#160;during the test through the use of Spring Test loaded application contexts.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is disabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is disabled<
 /p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ExcludeRoutes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates if certain route builder classes should be excluded from discovery. &#160;Initializes a&#160;<strong><code>org.apache.camel.spi.PackageScanClassResolver</code></strong> to exclude a set of given classes from being resolved. Typically this is used at test time to exclude certain routes,&#160;which might otherwise be just noisy, from being discovered and initialized.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled and no routes are excluded</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No routes are excluded</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.LazyLoadTypeConverters</code></p></td><td colspan="1" rowspan="1" cla
 ss="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="color: rgb(255,0,0);"><strong>Deprecated.</strong> </span></p><p>Indicates if the&#160;CamelContexts that are bootstrapped during the test through the use of Spring Test&#160;loaded application contexts should use lazy loading of type converters.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type converters are not lazy loaded</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type converters are not lazy loaded</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.MockEndpoints</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter.&#160; The default&#160;filter is&#160;<strong><code>"*"</code></strong> which matches all endpoints. &#1
 60;See&#160;<strong><code>org.apache.camel.impl.InterceptSendToMockEndpointStrategy</code></strong> for&#160;more details on the registration of the mock endpoints.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All endpoints are sniffed and recorded in a mock endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.MockEndpointsAndSkip</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter.&#160; The default&#160;filter is <strong><code>"*"</code></strong>, which matches all endpoints. &#160;See&#160;<a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java?view=mar
 kup">org.apache.camel.impl.InterceptSendToMockEndpointStrategy</a>&#160;for&#160;more details on the registration of the mock endpoints. &#160;This annotation will also skip sending the message to matched endpoints as well.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All endpoints are sniffed and recorded in a mock endpoint. &#160;The original endpoint is not invoked.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ProvidesBreakpoint</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Method</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates that the annotated method returns an&#160;<strong><code>org.apache.camel.spi.Breakpoint</code></strong> for use in the test.&#160; Useful for intercepting&#160;traffic to all endpoints or simply for setting a break point in an IDE for debugging.&#160; The me
 thod must&#160;be public, static, take no arguments, and return <strong><code>org.apache.camel.spi.Breakpoint</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>N/A</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The returned&#160;<strong><code>Breakpoint</code></strong> is registered in the CamelContext(s)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ShutdownTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates to set the shutdown timeout of all CamelContexts instantiated through the&#160;use of Spring Test loaded application contexts.&#160; If no annotation is used, the timeout is&#160;automatically reduced to 10 seconds by the test framework.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10 seconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10 se
 conds</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.UseAdviceWith</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates the use of&#160;<strong><code>adviceWith()</code></strong> within the test class.&#160; If a class is annotated with&#160;this annotation and&#160;<strong><code>UseAdviceWith#value()</code></strong> returns true, any&#160;CamelContexts bootstrapped during the test through the use of Spring Test loaded&#160;application contexts will not be started automatically.&#160;</p><p>The test author is responsible for&#160;injecting the Camel contexts into the test and executing&#160;<strong><code>CamelContext#start()</code></strong> on them&#160;at the appropriate time after any advice has been applied to the routes in the CamelContext(s).</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>CamelContexts do no
 t automatically start.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>CamelContexts do not automatically start.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.UseOverridePropertiesWithPropertiesComponent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Method</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong>Indicates that the annotated method returns a&#160;<strong><code>java.util.Properties</code></strong> for use in the test, and that those properties override any existing properties configured on the <strong><code>PropertiesComponent</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Override properties</p></td></tr></tbody></table></div><p>The following example illustrates the use of the <strong><code>@MockEndpoints</code></strong> annotation in order to se
 tup mock endpoints as interceptors on all endpoints using the Camel Log component and the <strong><code>@DisableJmx</code></strong> annotation to enable JMX which is disabled during tests by default. &#160;</p><div class="confluence-information-macro confluence-information-macro-information"><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">Note: we still use the <strong><code>@DirtiesContext</code></strong> annotation to ensure that the CamelContext, routes, and mock endpoints are reinitialized between test methods.</div></div><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@RunWith(CamelSpringJUnit4ClassRunner.class)
+</plain-text-body><h3 id="SpringTesting-CamelEnhancedSpringTest"><span style="line-height: 1.5625;">Camel Enhanced Spring Test</span></h3><p>Using the <strong><code>org.apache.camel.test.junit4.CamelSpringJUnit4ClassRunner</code></strong> runner with the&#160;<strong><code>@RunWith</code></strong> annotation or extending&#160;<strong><code>org.apache.camel.testng.AbstractCamelTestNGSpringContextTests</code></strong> provides the full feature set of Spring Test with support for the feature set provided in the&#160;<strong><code>CamelTestSupport</code></strong> classes. &#160;</p><p>A number of Camel specific annotations have been developed in order to provide for declarative manipulation of the Camel context(s) involved in the test. &#160;These annotations free your test classes from having to inherit from the&#160;<strong><code>CamelSpringTestSupport</code></strong> classes and also reduce the amount of code required to customize the tests.</p><div class="table-wrap"><table class="c
 onfluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p>Annotation Class</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Applies To</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Description</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavioir If Not Present</p></th><th colspan="1" rowspan="1" class="confluenceTh"><p>Default Behavior If Present</p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.DisableJmx</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates if JMX should be globally disabled in the CamelContexts that are bootstrapped &#160;during the test through the use of Spring Test loaded application contexts.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is disabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>JMX is dis
 abled</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ExcludeRoutes</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates if certain route builder classes should be excluded from discovery. &#160;Initializes a&#160;<strong><code>org.apache.camel.spi.PackageScanClassResolver</code></strong> to exclude a set of given classes from being resolved. Typically this is used at test time to exclude certain routes,&#160;which might otherwise be just noisy, from being discovered and initialized.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled and no routes are excluded</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>No routes are excluded</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.LazyLoadTypeConverters</code></p></td><td colspan="1" rowspan="
 1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><span style="color: rgb(255,0,0);"><strong>Deprecated.</strong> </span></p><p>Indicates if the&#160;CamelContexts that are bootstrapped during the test through the use of Spring Test&#160;loaded application contexts should use lazy loading of type converters.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type converters are not lazy loaded</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Type converters are not lazy loaded</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.MockEndpoints</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter.&#160; The default&#160;filter is&#160;<strong><code>"*"</code></strong> which matches all endpoint
 s. &#160;See&#160;<strong><code>org.apache.camel.impl.InterceptSendToMockEndpointStrategy</code></strong> for&#160;more details on the registration of the mock endpoints.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All endpoints are sniffed and recorded in a mock endpoint.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.MockEndpointsAndSkip</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Triggers the auto-mocking of endpoints whose URIs match the provided filter.&#160; The default&#160;filter is <strong><code>"*"</code></strong>, which matches all endpoints. &#160;See&#160;<a shape="rect" class="external-link" href="http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/InterceptSendToMockEndpointStrategy.java?vi
 ew=markup">org.apache.camel.impl.InterceptSendToMockEndpointStrategy</a>&#160;for&#160;more details on the registration of the mock endpoints. &#160;This annotation will also skip sending the message to matched endpoints as well.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Not enabled</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>All endpoints are sniffed and recorded in a mock endpoint. &#160;The original endpoint is not invoked.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ProvidesBreakpoint</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Method</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates that the annotated method returns an&#160;<strong><code>org.apache.camel.spi.Breakpoint</code></strong> for use in the test.&#160; Useful for intercepting&#160;traffic to all endpoints or simply for setting a break point in an IDE for debugging.&#160; 
 The method must&#160;be public, static, take no arguments, and return <strong><code>org.apache.camel.spi.Breakpoint</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>N/A</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>The returned&#160;<strong><code>Breakpoint</code></strong> is registered in the CamelContext(s)</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.ShutdownTimeout</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates to set the shutdown timeout of all CamelContexts instantiated through the&#160;use of Spring Test loaded application contexts.&#160; If no annotation is used, the timeout is&#160;automatically reduced to 10 seconds by the test framework.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>10 seconds</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p
 >10 seconds</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.UseAdviceWith</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Class</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>Indicates the use of&#160;<strong><code>adviceWith()</code></strong> within the test class.&#160; If a class is annotated with&#160;this annotation and&#160;<strong><code>UseAdviceWith#value()</code></strong> returns true, any&#160;CamelContexts bootstrapped during the test through the use of Spring Test loaded&#160;application contexts will not be started automatically.&#160;</p><p>The test author is responsible for&#160;injecting the Camel contexts into the test and executing&#160;<strong><code>CamelContext#start()</code></strong> on them&#160;at the appropriate time after any advice has been applied to the routes in the CamelContext(s).</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>CamelContexts
  do not automatically start.</p></td><td colspan="1" rowspan="1" class="confluenceTd"><p>CamelContexts do not automatically start.</p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p><code>org.apache.camel.test.spring.UseOverridePropertiesWithPropertiesComponent</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><code>Method</code></p></td><td colspan="1" rowspan="1" class="confluenceTd"><p><strong>Camel 2.16:</strong>Indicates that the annotated method returns a&#160;<strong><code>java.util.Properties</code></strong> for use in the test, and that those properties override any existing properties configured on the <strong><code>PropertiesComponent</code></strong>.</p></td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd"><p>Override properties</p></td></tr></tbody></table></div><p>The following example illustrates the use of the <strong><code>@MockEndpoints</code></strong> annotation in order
  to setup mock endpoints as interceptors on all endpoints using the Camel Log component and the <strong><code>@DisableJmx</code></strong> annotation to enable JMX which is disabled during tests by default. &#160;</p><rich-text-body>Note: we still use the <strong><code>@DirtiesContext</code></strong> annotation to ensure that the CamelContext, routes, and mock endpoints are reinitialized between test methods.</rich-text-body><parameter ac:name="language">java</parameter><plain-text-body>@RunWith(CamelSpringJUnit4ClassRunner.class)
 @BootstrapWith(CamelTestContextBootstrapper.class)
 @ContextConfiguration
 @DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
-@MockEndpoints(&quot;log:*&quot;)
+@MockEndpoints("log:*")
 @DisableJmx(false)
 public class CamelSpringJUnit4ClassRunnerPlainTest {
     @Autowired
@@ -256,49 +127,45 @@ public class CamelSpringJUnit4ClassRunne
 
     protected MockEndpoint mockB;
 
-    @EndpointInject(uri = &quot;mock:c&quot;, context = &quot;camelContext2&quot;)
+    @EndpointInject(uri = "mock:c", context = "camelContext2")
     protected MockEndpoint mockC;
 
-    @Produce(uri = &quot;direct:start2&quot;, context = &quot;camelContext2&quot;)
+    @Produce(uri = "direct:start2", context = "camelContext2")
     protected ProducerTemplate start2;
 
-    @EndpointInject(uri = &quot;mock:log:org.apache.camel.test.junit4.spring&quot;, context = &quot;camelContext2&quot;)
+    @EndpointInject(uri = "mock:log:org.apache.camel.test.junit4.spring", context = "camelContext2")
     protected MockEndpoint mockLog;
 
     @Test
     public void testPositive() throws Exception {
-        mockC.expectedBodiesReceived(&quot;David&quot;);
-        mockLog.expectedBodiesReceived(&quot;Hello David&quot;);
+        mockC.expectedBodiesReceived("David");
+        mockLog.expectedBodiesReceived("Hello David");
 
-        start2.sendBody(&quot;David&quot;);
+        start2.sendBody("David");
 
         MockEndpoint.assertIsSatisfied(camelContext);
     }
-]]></script>
-</div></div><h3 id="SpringTesting-AddingMoreMockExpectations">Adding More Mock Expectations</h3><p>If you wish to programmatically add any new assertions to your test you can easily do so with the following. Notice how we use&#160;<strong><code>@EndpointInject</code></strong> to inject a Camel endpoint into our code then the <a shape="rect" href="mock.html">Mock</a> API to add an expectation on a specific message.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@ContextConfiguration
+</plain-text-body><h3 id="SpringTesting-AddingMoreMockExpectations">Adding More Mock Expectations</h3><p>If you wish to programmatically add any new assertions to your test you can easily do so with the following. Notice how we use&#160;<strong><code>@EndpointInject</code></strong> to inject a Camel endpoint into our code then the <a shape="rect" href="mock.html">Mock</a> API to add an expectation on a specific message.</p><parameter ac:name="language">java</parameter><plain-text-body>@ContextConfiguration
 public class MyCamelTest extends AbstractJUnit38SpringContextTests {
     @Autowired
     protected CamelContext camelContext;
 
-    @EndpointInject(uri = &quot;mock:foo&quot;)
+    @EndpointInject(uri = "mock:foo")
     protected MockEndpoint foo;
 
     public void testMocksAreValid() throws Exception {
         // lets add more expectations
-        foo.message(0).header(&quot;bar&quot;).isEqualTo(&quot;ABC&quot;);
+        foo.message(0).header("bar").isEqualTo("ABC");
 
         MockEndpoint.assertIsSatisfied(camelContext);
     }
 }
-]]></script>
-</div></div><h3 id="SpringTesting-FurtherProcessingtheReceivedMessages">Further Processing the Received Messages</h3><p>Sometimes once a <a shape="rect" href="mock.html">Mock</a> endpoint has received some messages you want to then process them further to add further assertions that your test case worked as you expect.</p><p>So you can then process the received message exchanges if you like...</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[@ContextConfiguration
+</plain-text-body><h3 id="SpringTesting-FurtherProcessingtheReceivedMessages">Further Processing the Received Messages</h3><p>Sometimes once a <a shape="rect" href="mock.html">Mock</a> endpoint has received some messages you want to then process them further to add further assertions that your test case worked as you expect.</p><p>So you can then process the received message exchanges if you like...</p><parameter ac:name="language">java</parameter><plain-text-body>@ContextConfiguration
 public class MyCamelTest extends AbstractJUnit38SpringContextTests {
     @Autowired
     protected CamelContext camelContext;
 
-    @EndpointInject(uri = &quot;mock:foo&quot;)
+    @EndpointInject(uri = "mock:foo")
     protected MockEndpoint foo;
 
     public void testMocksAreValid() throws Exception {
@@ -314,25 +181,22 @@ public class MyCamelTest extends Abstrac
         }
     }
 }
-]]></script>
-</div></div><h3 id="SpringTesting-SendingandReceivingMessages">Sending and Receiving Messages</h3><p>It might be that the <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> you have defined in either <a shape="rect" href="spring.html">Spring</a> XML or using the Java <a shape="rect" href="dsl.html">DSL</a> do all of the sending and receiving and you might just work with the <a shape="rect" href="mock.html">Mock</a> endpoints as described above. However sometimes in a test case its useful to explicitly send or receive messages directly.</p><p>To send or receive messages you should use the <a shape="rect" href="bean-integration.html">Bean Integration</a> mechanism. For example to send messages inject a&#160;<strong><code>ProducerTemplate</code></strong> using the&#160;<strong><code>@EndpointInject</code></strong> annotation then call the various send methods on this object to send a message to an endpoint. To consume messages use the&#160;<
 strong><code>@MessageDriven</code></strong> annotation on a method to have the method invoked when a message is received.</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[public class Foo {
-  @EndpointInject(uri = &quot;activemq:foo.bar&quot;)
+</plain-text-body><h3 id="SpringTesting-SendingandReceivingMessages">Sending and Receiving Messages</h3><p>It might be that the <a shape="rect" href="enterprise-integration-patterns.html">Enterprise Integration Patterns</a> you have defined in either <a shape="rect" href="spring.html">Spring</a> XML or using the Java <a shape="rect" href="dsl.html">DSL</a> do all of the sending and receiving and you might just work with the <a shape="rect" href="mock.html">Mock</a> endpoints as described above. However sometimes in a test case its useful to explicitly send or receive messages directly.</p><p>To send or receive messages you should use the <a shape="rect" href="bean-integration.html">Bean Integration</a> mechanism. For example to send messages inject a&#160;<strong><code>ProducerTemplate</code></strong> using the&#160;<strong><code>@EndpointInject</code></strong> annotation then call the various send methods on this object to send a message to an endpoint. To consume messages use the&
 #160;<strong><code>@MessageDriven</code></strong> annotation on a method to have the method invoked when a message is received.</p><parameter ac:name="language">java</parameter><plain-text-body>public class Foo {
+  @EndpointInject(uri = "activemq:foo.bar")
   ProducerTemplate producer;
 
   public void doSomething() {
     // lets send a message!
-    producer.sendBody(&quot;&lt;hello&gt;world!&lt;/hello&gt;&quot;);
+    producer.sendBody("&lt;hello&gt;world!&lt;/hello&gt;");
   }
 
-  // lets consume messages from the &#39;cheese&#39; queue
-  @MessageDriven(uri=&quot;activemq:cheese&quot;)
+  // lets consume messages from the 'cheese' queue
+  @MessageDriven(uri="activemq:cheese")
   public void onCheese(String name) {
     // ...
   }
 }
-]]></script>
-</div></div><h3 id="SpringTesting-SeeAlso">See Also</h3><ul><li>A <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.java">real example test case using Mock and Spring</a> along with its <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.xml">Spring XML</a></li><li><a shape="rect" href="bean-integration.html">Bean Integration</a></li><li><a shape="rect" href="mock.html">Mock</a> endpoint</li><li><a shape="rect" href="test.html">Test</a> endpoint</li></ul></div>
+</plain-text-body><h3 id="SpringTesting-SeeAlso">See Also</h3><ul><li>A <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.java">real example test case using Mock and Spring</a> along with its <a shape="rect" class="external-link" href="https://svn.apache.org/repos/asf/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/mock/InterceptSendToMockEndpointStrategyTest.xml">Spring XML</a></li><li><a shape="rect" href="bean-integration.html">Bean Integration</a></li><li><a shape="rect" href="mock.html">Mock</a> endpoint</li><li><a shape="rect" href="test.html">Test</a> endpoint</li></ul></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/springintegration.html
==============================================================================
--- websites/production/camel/content/springintegration.html (original)
+++ websites/production/camel/content/springintegration.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: SpringIntegration
@@ -91,35 +80,28 @@
 <p>The <strong>spring-integration:</strong> component provides a bridge for Camel components to talk to <a shape="rect" class="external-link" href="http://www.springsource.org/spring-integration" rel="nofollow">spring integration endpoints</a>.</p>
 
 <p>Maven users will need to add the following dependency to their <code>pom.xml</code> for this component:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<parameter ac:name="">xml</parameter><plain-text-body>
 &lt;dependency&gt;
     &lt;groupId&gt;org.apache.camel&lt;/groupId&gt;
     &lt;artifactId&gt;camel-spring-integration&lt;/artifactId&gt;
     &lt;version&gt;x.x.x&lt;/version&gt;
     &lt;!-- use the same version as your Camel core version --&gt;
 &lt;/dependency&gt;
-]]></script>
-</div></div>
+</plain-text-body>
 
 <h3 id="SpringIntegration-URIformat">URI format</h3>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<plain-text-body>
 spring-integration:defaultChannelName[?options]
-]]></script>
-</div></div>
+</plain-text-body>
 <p>Where <strong>defaultChannelName</strong> represents the default channel name which is used by the Spring Integration Spring context. It will equal to the <code>inputChannel</code> name for the Spring Integration consumer and the <code>outputChannel</code> name for the Spring Integration provider.</p>
 
 <p>You can append query options to the URI in the following format, <code>?option=value&amp;option=value&amp;...</code></p>
 
 <h3 id="SpringIntegration-Options">Options</h3>
-<div class="confluenceTableSmall">
+<parameter ac:name="class">confluenceTableSmall</parameter><rich-text-body>
 <div class="table-wrap"><table class="confluenceTable"><tbody><tr><th colspan="1" rowspan="1" class="confluenceTh"><p> Name </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Type </p></th><th colspan="1" rowspan="1" class="confluenceTh"><p> Description </p></th></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>inputChannel</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Spring integration input channel name that this endpoint wants to consume from, where the specified channel name is defined in the Spring context. </p></td></tr><tr><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>outputChannel</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The Spring integration output channel name that is used to send messages to the Spring integration context. </p></td></tr><t
 r><td colspan="1" rowspan="1" class="confluenceTd"><p> <code>inOut</code> </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> String </p></td><td colspan="1" rowspan="1" class="confluenceTd"><p> The exchange pattern that the Spring integration endpoint should use. If <code>inOut=true</code> then a reply channel is expected, either from the Spring Integration Message header or configured on the endpoint. </p></td></tr></tbody></table></div>
-</div>
-
-
-
+</rich-text-body>
 
 <h3 id="SpringIntegration-Usage">Usage</h3>
 
@@ -130,83 +112,13 @@ spring-integration:defaultChannelName[?o
 <h4 id="SpringIntegration-UsingtheSpringintegrationendpoint">Using the Spring integration endpoint</h4>
 <p>You can set up a Spring integration endpoint using a URI, as follows: </p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;beans:beans xmlns=&quot;http://www.springframework.org/schema/integration&quot;
-             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-             xmlns:beans=&quot;http://www.springframework.org/schema/beans&quot;
-             xsi:schemaLocation=&quot;
-             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-             http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
-             http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&gt;
-
-    &lt;!-- spring integration channels --&gt;
-    &lt;channel id=&quot;inputChannel&quot;/&gt;
-    &lt;channel id=&quot;outputChannel&quot;/&gt;
-    &lt;channel id=&quot;onewayChannel&quot;/&gt;
-
-    &lt;!-- spring integration service activators --&gt;
-    &lt;service-activator input-channel=&quot;inputChannel&quot; ref=&quot;helloService&quot; method=&quot;sayHello&quot;/&gt;
-    &lt;service-activator input-channel=&quot;onewayChannel&quot; ref=&quot;helloService&quot; method=&quot;greet&quot;/&gt;
-
-    &lt;!-- custom bean --&gt;
-    &lt;beans:bean id=&quot;helloService&quot; class=&quot;org.apache.camel.component.spring.integration.HelloWorldService&quot;/&gt;
-
-    &lt;camelContext id=&quot;camel&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-        &lt;route&gt;
-            &lt;from uri=&quot;direct:twowayMessage&quot;/&gt;
-            &lt;to uri=&quot;spring-integration:inputChannel?inOut=true&amp;amp;inputChannel=outputChannel&quot;/&gt;
-        &lt;/route&gt;
-        &lt;route&gt;
-            &lt;from uri=&quot;direct:onewayMessage&quot;/&gt;
-            &lt;to uri=&quot;spring-integration:onewayChannel?inOut=false&quot;/&gt;
-        &lt;/route&gt;
-    &lt;/camelContext&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/producer.xml}</plain-text-body>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- spring integration channels --&gt;
-&lt;channel id=&quot;requestChannel&quot;/&gt;
-&lt;channel id=&quot;responseChannel&quot;/&gt;
-
-&lt;!-- cusom Camel processor --&gt;
-&lt;beans:bean id=&quot;myProcessor&quot; class=&quot;org.apache.camel.component.spring.integration.MyProcessor&quot;/&gt;
-
-&lt;!-- Camel route --&gt;
-&lt;camelContext  xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;route&gt;
-        &lt;from uri=&quot;spring-integration://requestChannel?outputChannel=responseChannel&amp;amp;inOut=true&quot;/&gt;
-        &lt;process ref=&quot;myProcessor&quot;/&gt;
-    &lt;/route&gt;
-&lt;/camelContext&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/twoWayConsumer.xml}</plain-text-body>
 
 <p>Or directly using a Spring integration channel name:</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;beans:beans xmlns=&quot;http://www.springframework.org/schema/integration&quot;
-             xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-             xmlns:beans=&quot;http://www.springframework.org/schema/beans&quot;
-             xsi:schemaLocation=&quot;
-             http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-	         http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
-	         http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd&quot;&gt;
-
-    &lt;!-- spring integration channel --&gt;
-    &lt;channel id=&quot;outputChannel&quot;/&gt;
-
-    &lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-        &lt;route&gt;
-            &lt;from uri=&quot;outputChannel&quot;/&gt;
-            &lt;to uri=&quot;mock:result&quot;/&gt;
-        &lt;/route&gt;
-    &lt;/camelContext&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/springChannelConverter.xml}</plain-text-body>
 
 <h4 id="SpringIntegration-TheSourceandTargetadapter">The Source and Target adapter</h4>
 
@@ -214,97 +126,16 @@ spring-integration:defaultChannelName[?o
 
 <p>This example uses the following namespaces:</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;beans:beans xmlns=&quot;http://www.springframework.org/schema/integration&quot;
-       xmlns:beans=&quot;http://www.springframework.org/schema/beans&quot;
-       xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
-       xmlns:camel-si=&quot;http://camel.apache.org/schema/spring/integration&quot;
-       xsi:schemaLocation=&quot;
-       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd
-       http://camel.apache.org/schema/spring/integration http://camel.apache.org/schema/spring/integration/camel-spring-integration.xsd
-       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
-    &quot;&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=header|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml}</plain-text-body>
 
 <p>You can bind your source or target to a Camel endpoint as follows:</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- Create the camel context here --&gt;
-&lt;camelContext id=&quot;camelTargetContext&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;route&gt;
-        &lt;from uri=&quot;direct:EndpointA&quot; /&gt;
-        &lt;to uri=&quot;mock:result&quot; /&gt;
-    &lt;/route&gt;
-    &lt;route&gt;
-        &lt;from uri=&quot;direct:EndpointC&quot;/&gt;
-        &lt;process ref=&quot;myProcessor&quot;/&gt;
-      &lt;/route&gt;
-&lt;/camelContext&gt;
-
-&lt;!-- We can bind the camelTarget to the camel context&#39;s endpoint by specifying the camelEndpointUri attribute --&gt;
-&lt;camel-si:camelTarget id=&quot;camelTargetA&quot; camelEndpointUri=&quot;direct:EndpointA&quot; expectReply=&quot;false&quot;&gt;
-    &lt;camel-si:camelContextRef&gt;camelTargetContext&lt;/camel-si:camelContextRef&gt;
-&lt;/camel-si:camelTarget&gt;
-
-&lt;camel-si:camelTarget id=&quot;camelTargetB&quot; camelEndpointUri=&quot;direct:EndpointC&quot; replyChannel=&quot;channelC&quot; expectReply=&quot;true&quot;&gt;
-    &lt;camel-si:camelContextRef&gt;camelTargetContext&lt;/camel-si:camelContextRef&gt;
-&lt;/camel-si:camelTarget&gt;
-
-&lt;camel-si:camelTarget id=&quot;camelTargetD&quot; camelEndpointUri=&quot;direct:EndpointC&quot; expectReply=&quot;true&quot;&gt;
-    &lt;camel-si:camelContextRef&gt;camelTargetContext&lt;/camel-si:camelContextRef&gt;
-&lt;/camel-si:camelTarget&gt;
+<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelTarget.xml}</plain-text-body>
 
-&lt;beans:bean id=&quot;myProcessor&quot; class=&quot;org.apache.camel.component.spring.integration.MyProcessor&quot;/&gt;
-]]></script>
-</div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- spring integration channels --&gt;
-&lt;channel id=&quot;channelA&quot;/&gt;
-&lt;channel id=&quot;channelB&quot;/&gt;
-&lt;channel id=&quot;channelC&quot;/&gt;
-
-&lt;!-- spring integration service activator --&gt;
-&lt;service-activator input-channel=&quot;channelB&quot; output-channel=&quot;channelC&quot; ref=&quot;helloService&quot; method=&quot;sayHello&quot;/&gt;
-
-&lt;!-- custom bean --&gt;
-&lt;beans:bean id=&quot;helloService&quot; class=&quot;org.apache.camel.component.spring.integration.HelloWorldService&quot;/&gt;
-
-&lt;camelContext id=&quot;camelSourceContext&quot; xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-    &lt;route&gt;
-        &lt;from uri=&quot;direct:OneWay&quot;/&gt;
-        &lt;to uri=&quot;direct:EndpointB&quot;/&gt;
-    &lt;/route&gt;
-    &lt;route&gt;
-        &lt;from uri=&quot;direct:TwoWay&quot;/&gt;
-        &lt;to uri=&quot;direct:EndpointC&quot;/&gt;
-    &lt;/route&gt;
-&lt;/camelContext&gt;
-
-&lt;!-- camelSource will redirect the message coming for direct:EndpointB to the spring requestChannel channelA --&gt;
-&lt;camel-si:camelSource id=&quot;camelSourceA&quot; camelEndpointUri=&quot;direct:EndpointB&quot;
-                      requestChannel=&quot;channelA&quot; expectReply=&quot;false&quot;&gt;
-    &lt;camel-si:camelContextRef&gt;camelSourceContext&lt;/camel-si:camelContextRef&gt;
-&lt;/camel-si:camelSource&gt;
-
-&lt;!-- camelSource will redirect the message coming for direct:EndpointC to the spring requestChannel channelB
-     then it will pull the response from channelC and put the response message back to direct:EndpointC --&gt;
-
-&lt;camel-si:camelSource id=&quot;camelSourceB&quot; camelEndpointUri=&quot;direct:EndpointC&quot;
-                      requestChannel=&quot;channelB&quot; replyChannel=&quot;channelC&quot; expectReply=&quot;true&quot;&gt;
-    &lt;camel-si:camelContextRef&gt;camelSourceContext&lt;/camel-si:camelContextRef&gt;
-&lt;/camel-si:camelSource&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=example|lang=xml|url=camel/trunk/components/camel-spring-integration/src/test/resources/org/apache/camel/component/spring/integration/adapter/CamelSource.xml}</plain-text-body>
 
 
-<h3 id="SpringIntegration-SeeAlso">See Also</h3>
-<ul><li><a shape="rect" href="configuring-camel.html">Configuring Camel</a></li><li><a shape="rect" href="component.html">Component</a></li><li><a shape="rect" href="endpoint.html">Endpoint</a></li><li><a shape="rect" href="getting-started.html">Getting Started</a></li></ul></div>
+<parameter ac:name=""><a shape="rect" href="endpoint-see-also.html">Endpoint See Also</a></parameter></div>
         </td>
         <td valign="top">
           <div class="navigation">

Modified: websites/production/camel/content/sql-example.html
==============================================================================
--- websites/production/camel/content/sql-example.html (original)
+++ websites/production/camel/content/sql-example.html Fri Aug 25 08:22:01 2017
@@ -36,17 +36,6 @@
     <![endif]-->
 
 
-  <link href='//camel.apache.org/styles/highlighter/styles/shCoreCamel.css' rel='stylesheet' type='text/css' />
-  <link href='//camel.apache.org/styles/highlighter/styles/shThemeCamel.css' rel='stylesheet' type='text/css' />
-  <script src='//camel.apache.org/styles/highlighter/scripts/shCore.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushJava.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushXml.js' type='text/javascript'></script>
-  <script src='//camel.apache.org/styles/highlighter/scripts/shBrushPlain.js' type='text/javascript'></script>
-  
-  <script type="text/javascript">
-  SyntaxHighlighter.defaults['toolbar'] = false;
-  SyntaxHighlighter.all();
-  </script>
 
     <title>
     Apache Camel: SQL Example
@@ -93,11 +82,9 @@
 There is a <code>README.txt</code> file with instructions how to run it.</p>
 
 <p>If you use maven then you can easily compile and install the example from the command line:</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<plain-text-body>
 mvn install
-]]></script>
-</div></div>
+</plain-text-body>
 
 <h3 id="SQLExample-About">About</h3>
 
@@ -110,93 +97,26 @@ The second route pickup the newly insert
 
 <p>In the <code>camel-context.xml</code> file in the <code>src/main/resources/META-INF/spring</code> folder we have the Spring XML file to setup and configure the database, as well the <a shape="rect" href="camelcontext.html">CamelContext</a>.</p>
 
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Setting up database</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- this is the JDBC data source which uses an in-memory only Apache Derby database --&gt;
-&lt;bean id=&quot;dataSource&quot; class=&quot;org.apache.commons.dbcp.BasicDataSource&quot; destroy-method=&quot;close&quot;&gt;
-  &lt;property name=&quot;driverClassName&quot; value=&quot;org.apache.derby.jdbc.EmbeddedDriver&quot;/&gt;
-  &lt;property name=&quot;url&quot; value=&quot;jdbc:derby:memory:orders;create=true&quot;/&gt;
-  &lt;property name=&quot;username&quot; value=&quot;&quot;/&gt;
-  &lt;property name=&quot;password&quot; value=&quot;&quot;/&gt;
-&lt;/bean&gt;
-
-&lt;!-- bean which creates/destroys the database table for this example --&gt;
-&lt;bean id=&quot;initDatabase&quot; class=&quot;org.apache.camel.example.sql.DatabaseBean&quot;
-      init-method=&quot;create&quot; destroy-method=&quot;destroy&quot;&gt;
-  &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot;/&gt;
-&lt;/bean&gt;
-
-&lt;!-- configure the Camel SQL component to use the JDBC data source --&gt;
-&lt;bean id=&quot;sql&quot; class=&quot;org.apache.camel.component.sql.SqlComponent&quot;&gt;
-  &lt;property name=&quot;dataSource&quot; ref=&quot;dataSource&quot;/&gt;
-&lt;/bean&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e1|lang=xml|title=Setting up database|url=camel/trunk/examples/camel-example-sql/src/main/resources/META-INF/spring/camel-context.xml}</plain-text-body>
 
 <p>And then in the same file we setup our Camel application. At first we have a orderBean that we use in the routes to generate new orders and process orders as well.</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>Camel application</b></div><div class="codeContent panelContent pdl">
-<script class="brush: xml; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-&lt;!-- order bean is our business logic bean that creates new orders --&gt;
-&lt;bean id=&quot;orderBean&quot; class=&quot;org.apache.camel.example.sql.OrderBean&quot;/&gt;
-
-&lt;!-- here is Camel configured with a number of routes --&gt;
-&lt;camelContext xmlns=&quot;http://camel.apache.org/schema/spring&quot;&gt;
-
-  &lt;!-- use Camel property placeholder loaded from the given file --&gt;
-  &lt;propertyPlaceholder id=&quot;placeholder&quot; location=&quot;classpath:sql.properties&quot;/&gt;
-
-  &lt;!-- route that generate new orders and insert them in the database --&gt;
-  &lt;route id=&quot;generateOrder-route&quot;&gt;
-    &lt;from uri=&quot;timer:foo?period=5s&quot;/&gt;
-    &lt;transform&gt;
-      &lt;method ref=&quot;orderBean&quot; method=&quot;generateOrder&quot;/&gt;
-    &lt;/transform&gt;
-    &lt;to uri=&quot;sql:{{sql.insertOrder}}&quot;/&gt;
-    &lt;log message=&quot;Inserted new order ${body[id]}&quot;/&gt;
-  &lt;/route&gt;
-
-  &lt;!-- route that process the orders by picking up new rows from the database
-       and when done processing then update the row to mark it as processed --&gt;
-  &lt;route id=&quot;processOrder-route&quot;&gt;
-    &lt;from uri=&quot;sql:{{sql.selectOrder}}?onConsume={{sql.markOrder}}&quot;/&gt;
-    &lt;to uri=&quot;bean:orderBean?method=processOrder&quot;/&gt;
-    &lt;log message=&quot;${body}&quot;/&gt;
-  &lt;/route&gt;
-
-&lt;/camelContext&gt;
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e2|lang=xml|title=Camel application|url=camel/trunk/examples/camel-example-sql/src/main/resources/META-INF/spring/camel-context.xml}</plain-text-body>
 
 <p>Notice how we have externalized the SQL queries, and use Camels <a shape="rect" href="using-propertyplaceholder.html">property placeholder</a> to refer to the <code>sql.properties</code> file.</p>
 
-<div class="confluence-information-macro confluence-information-macro-information"><p class="title">Using named query parameters</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body">
+<parameter ac:name="title">Using named query parameters</parameter><rich-text-body>
 <p>Notice in the SQL queries below we use named parameters which must start with prefix ':#' and then the name, eg :#amount. Then Camel will bind that parameter with the given name, from the<br clear="none">
-message body (if its a <code>java.util.Map</code>) or from a message header with the name. If none parameter could be found, Camel throws an exception.</p></div></div>
-
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeHeader panelHeader pdl" style="border-bottom-width: 1px;"><b>SQL queries</b></div><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
-## notice we use named parameters in the queries, eg :#name. A named query parameter must start with :#
-## sql that insert new orders
-sql.insertOrder=insert into orders (id, item, amount, description, processed) values (:#id, :#item, :#amount, :#description, false)
+message body (if its a <code>java.util.Map</code>) or from a message header with the name. If none parameter could be found, Camel throws an exception.</p></rich-text-body>
 
-## sql that select all unprocessed orders
-sql.selectOrder=select * from orders where processed = false
-
-## sql that update the order as being processed
-sql.markOrder=update orders set processed = true where id = :#id
-
-]]></script>
-</div></div>
+<plain-text-body>{snippet:id=e1|title=SQL queries|url=camel/trunk/examples/camel-example-sql/src/main/resources/sql.properties}</plain-text-body>
 
 
 <h3 id="SQLExample-Runningtheexample">Running the example</h3>
 
 <p>This example can be run from the command line</p>
-<div class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
-<script class="brush: java; gutter: false; theme: Default" type="syntaxhighlighter"><![CDATA[
+<plain-text-body>
 mvn camel:run
-]]></script>
-</div></div>
+</plain-text-body>
 
 <p>Press ctrl + c to stop the example.</p>