camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1015019 - in /websites/production/camel/content: book-cookbook.html book-in-one-page.html cache/main.pageCache spring-testing.html
Date Wed, 05 Jul 2017 18:20:57 GMT
Author: buildbot
Date: Wed Jul  5 18:20:57 2017
New Revision: 1015019

Log:
Production update by buildbot for camel

Modified:
    websites/production/camel/content/book-cookbook.html
    websites/production/camel/content/book-in-one-page.html
    websites/production/camel/content/cache/main.pageCache
    websites/production/camel/content/spring-testing.html

Modified: websites/production/camel/content/book-cookbook.html
==============================================================================
--- websites/production/camel/content/book-cookbook.html (original)
+++ websites/production/camel/content/book-cookbook.html Wed Jul  5 18:20:57 2017
@@ -1959,7 +1959,7 @@ public class MyCamelTest {
     }
 }
 ]]></script>
-</div></div><h3 id="Bookcookbook-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="confluen
 ceTable"><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" clas
 s="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. &#16
 0;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=mark
 up">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 met
 hod 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 sec
 onds</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"><code>org.apache.camel.test.spring.UseOverridePropertiesWithPropertiesComponent</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Method</code></td><td colspan="1" rowspan="1" class="confluenceTd"><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>.</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">Override properties</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 interce
 ptors 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">
+</div></div><h3 id="Bookcookbook-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="confluen
 ceTable"><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" clas
 s="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. &#16
 0;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=mark
 up">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 met
 hod 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 sec
 onds</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 set
 up 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)
 @BootstrapWith(CamelTestContextBootstrapper.class)
 @ContextConfiguration

Modified: websites/production/camel/content/book-in-one-page.html
==============================================================================
--- websites/production/camel/content/book-in-one-page.html (original)
+++ websites/production/camel/content/book-in-one-page.html Wed Jul  5 18:20:57 2017
@@ -3044,7 +3044,7 @@ public class MyCamelTest {
     }
 }
 ]]></script>
-</div></div><h3 id="BookInOnePage-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"><code>org.apache.camel.test.spring.UseOverridePropertiesWithPropertiesComponent</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Method</code></td><td colspan="1" rowspan="1" class="confluenceTd"><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>.</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">Override properties</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 interc
 eptors 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">
+</div></div><h3 id="BookInOnePage-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)
 @BootstrapWith(CamelTestContextBootstrapper.class)
 @ContextConfiguration
@@ -3545,11 +3545,11 @@ The tutorial has been designed in two pa
 While not actual tutorials you might find working through the source of the various <a shape="rect" href="examples.html">Examples</a> useful.</li></ul>
 
 <h2 id="BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</h2><p>&#160;</p><div class="confluence-information-macro confluence-information-macro-information"><p class="title">Thanks</p><span class="aui-icon aui-icon-small aui-iconfont-info confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>This tutorial was kindly donated to Apache Camel by Martin Gilday.</p></div></div><h2 id="BookInOnePage-Preface">Preface</h2><p>This tutorial aims to guide the reader through the stages of creating a project which uses Camel to facilitate the routing of messages from a JMS queue to a <a shape="rect" class="external-link" href="http://www.springramework.org" rel="nofollow">Spring</a> service. The route works in a synchronous fashion returning a response to the client.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1498782575222 {padding: 0px;}
-div.rbtoc1498782575222 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1498782575222 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499278715591 {padding: 0px;}
+div.rbtoc1499278715591 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499278715591 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1498782575222">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499278715591">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialonSpringRemotingwithJMS">Tutorial on Spring Remoting with JMS</a></li><li><a shape="rect" href="#BookInOnePage-Preface">Preface</a></li><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-About">About</a></li><li><a shape="rect" href="#BookInOnePage-CreatetheCamelProject">Create the Camel Project</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-UpdatethePOMwithDependencies">Update the POM with Dependencies</a></li></ul>
 </li><li><a shape="rect" href="#BookInOnePage-WritingtheServer">Writing the Server</a>
@@ -5664,11 +5664,11 @@ So we completed the last piece in the pi
 <p>This example has been removed from <strong>Camel 2.9</strong> onwards. Apache Axis 1.4 is a very old and unsupported framework. We encourage users to use <a shape="rect" href="cxf.html">CXF</a> instead of Axis.</p></div></div>
 
 <style type="text/css">/*<![CDATA[*/
-div.rbtoc1498782575621 {padding: 0px;}
-div.rbtoc1498782575621 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1498782575621 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499278716195 {padding: 0px;}
+div.rbtoc1499278716195 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499278716195 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style><div class="toc-macro rbtoc1498782575621">
+/*]]>*/</style><div class="toc-macro rbtoc1499278716195">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-TutorialusingAxis1.4withApacheCamel">Tutorial using Axis 1.4 with Apache Camel</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Prerequisites">Prerequisites</a></li><li><a shape="rect" href="#BookInOnePage-Distribution">Distribution</a></li><li><a shape="rect" href="#BookInOnePage-Introduction">Introduction</a></li><li><a shape="rect" href="#BookInOnePage-SettinguptheprojecttorunAxis">Setting up the project to run Axis</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Maven2">Maven 2</a></li><li><a shape="rect" href="#BookInOnePage-wsdl">wsdl</a></li><li><a shape="rect" href="#BookInOnePage-ConfiguringAxis">Configuring Axis</a></li><li><a shape="rect" href="#BookInOnePage-RunningtheExample">Running the Example</a></li></ul>
@@ -16871,11 +16871,11 @@ template.send(&quot;direct:alias-verify&
 ]]></script>
 </div></div><p></p><h3 id="BookInOnePage-SeeAlso.28">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><ul><li><a shape="rect" href="crypto.html">Crypto</a> Crypto is also available as a <a shape="rect" href="data-format.html">Data Format</a></li></ul> <h2 id="BookInOnePage-CXFComponent">CXF Component</h2><div class="confluence-information-macro confluence-information-macro-note"><span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF as a consumer, the <a shape="rect" href="cxf-bean-component.html">CXF Bean Component</a> allows you to factor out how message payloads are received from their processing as a RESTful or SOAP web service. This has the potential of using a multitude of transports to consume web 
 services. The bean component's configuration is also simpler and provides the fastest method to implement web services using Camel and CXF.</p></div></div><div class="confluence-information-macro confluence-information-macro-tip"><span class="aui-icon aui-icon-small aui-iconfont-approve confluence-information-macro-icon"></span><div class="confluence-information-macro-body"><p>When using CXF in streaming modes (see DataFormat option), then also read about <a shape="rect" href="stream-caching.html">Stream caching</a>.</p></div></div><p>The <strong>cxf:</strong> component provides integration with <a shape="rect" href="http://cxf.apache.org">Apache CXF</a> for connecting to JAX-WS services hosted in CXF.</p><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1498782583815 {padding: 0px;}
-div.rbtoc1498782583815 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1498782583815 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1499278740141 {padding: 0px;}
+div.rbtoc1499278740141 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1499278740141 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1498782583815">
+/*]]>*/</style></p><div class="toc-macro rbtoc1499278740141">
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-CXFComponent">CXF Component</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-URIformat">URI format</a></li><li><a shape="rect" href="#BookInOnePage-Options">Options</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#BookInOnePage-Thedescriptionsofthedataformats">The descriptions of the dataformats</a>

Modified: websites/production/camel/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/camel/content/spring-testing.html
==============================================================================
--- websites/production/camel/content/spring-testing.html (original)
+++ websites/production/camel/content/spring-testing.html Wed Jul  5 18:20:57 2017
@@ -243,7 +243,7 @@ public class MyCamelTest {
     }
 }
 ]]></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"><code>org.apache.camel.test.spring.UseOverridePropertiesWithPropertiesComponent</code></td><td colspan="1" rowspan="1" class="confluenceTd"><code>Method</code></td><td colspan="1" rowspan="1" class="confluenceTd"><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>.</td><td colspan="1" rowspan="1" class="confluenceTd">&#160;</td><td colspan="1" rowspan="1" class="confluenceTd">Override properties</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 interc
 eptors 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">
+</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)
 @BootstrapWith(CamelTestContextBootstrapper.class)
 @ContextConfiguration



Mime
View raw message