You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/24 10:46:52 UTC

[camel-karaf] 01/02: Added camel-test-blueprint

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

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

commit 179311650ec960e9550ffc6faa1ece483a7d9055
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue Mar 24 11:45:08 2020 +0100

    Added camel-test-blueprint
---
 components/camel-test-blueprint/pom.xml            | 186 +++++++
 .../services/org/apache/camel/other.properties     |   7 +
 .../src/generated/resources/test-blueprint.json    |  14 +
 .../src/main/docs/test-blueprint.adoc              | 189 +++++++
 .../camel/test/blueprint/CamelBlueprintHelper.java | 595 +++++++++++++++++++++
 .../test/blueprint/CamelBlueprintTestSupport.java  | 547 +++++++++++++++++++
 .../java/org/apache/camel/test/blueprint/Main.java | 199 +++++++
 .../camel/test/blueprint/AttributeNewLineTest.java |  40 ++
 .../camel/test/blueprint/BeanInjectTest.java       |  37 ++
 .../camel/test/blueprint/BeanStaticMethodTest.java |  39 ++
 .../test/blueprint/BlueprintAddServiceTest.java    |  54 ++
 .../test/blueprint/BlueprintBeanInjectRoute.java   |  42 ++
 .../BlueprintComponentPropertyPlaceholderTest.java |  46 ++
 .../test/blueprint/BlueprintDefaultValuesTest.java |  49 ++
 .../blueprint/BlueprintMultipleServiceTest.java    |  82 +++
 .../BlueprintOptionalPropertiesDslTest.java        |  43 ++
 .../test/blueprint/BlueprintPackageScan2Test.java  |  44 ++
 .../blueprint/BlueprintPackageScanBuilderTest.java |  40 ++
 .../test/blueprint/BlueprintPackageScanTest.java   |  44 ++
 ...lueprintProduceConsumeImplicitPropertyTest.java |  40 ++
 ...printPropertiesLocationElementImplicitTest.java |  50 ++
 ...printPropertiesLocationElementOptionalTest.java |  50 ++
 .../BlueprintPropertiesLocationElementTest.java    |  50 ++
 .../test/blueprint/BlueprintPropertiesTest.java    |  76 +++
 .../blueprint/BlueprintPropertyInjectRoute.java    |  34 ++
 .../test/blueprint/BlueprintStaticMethodRoute.java |  31 ++
 .../BlueprintStreamCachingStrategyTest.java        |  41 ++
 .../test/blueprint/CamelEndpointInjectTest.java    |  44 ++
 .../test/blueprint/ConfigAdminEndpointTest.java    |  40 ++
 ...dpointWithSynchronousBlueprintCreationTest.java |  45 ++
 .../test/blueprint/ConfigAdminExtFileTest.java     |  42 ++
 ...minInitialConfigurationUsingPropertiesTest.java |  47 ++
 ...gAdminLoadConfigurationFileAndOverrideTest.java |  66 +++
 ...nfigAdminLoadConfigurationFileNotFoundTest.java |  58 ++
 .../ConfigAdminLoadConfigurationFileTest.java      |  49 ++
 ...adMultiConfigurationFileAndOverrideAltTest.java |  64 +++
 ...nLoadMultiConfigurationFileAndOverrideTest.java |  64 +++
 ...gAdminNoDefaultValuesBlueprintCreationTest.java |  49 ++
 .../ConfigAdminNoReloadDefaultPropertiesTest.java  |  40 ++
 ...ReloadLoadConfigurationFileAndOverrideTest.java |  66 +++
 ...LoadConfigurationFileDefaultPropertiesTest.java |  49 ++
 ...nfigAdminNoReloadLoadConfigurationFileTest.java |  49 ++
 ...dOverridePropertiesOutsideCamelContextTest.java |  57 ++
 ...nOverridePropertiesOutsideCamelContextTest.java |  53 ++
 .../ConfigAdminOverridePropertiesTest.java         |  54 ++
 .../camel/test/blueprint/ConfigAdminTest.java      |  40 ++
 .../test/blueprint/ContextCreationTimeoutTest.java | 142 +++++
 .../camel/test/blueprint/CustomIdIssuesTest.java   |  55 ++
 ...etterChannelLogExhaustedMessageHistoryTest.java |  33 ++
 .../DeadLetterChannelOnPrepareTestTest.java        |  49 ++
 .../camel/test/blueprint/DebugBlueprintTest.java   |  75 +++
 ...ErrorHandlerLogExhaustedMessageHistoryTest.java |  38 ++
 .../DefaultErrorHandlerOnPrepareTestTest.java      |  53 ++
 .../camel/test/blueprint/EndpointPropertyTest.java |  52 ++
 .../camel/test/blueprint/EventNotifierTest.java    |  41 ++
 .../apache/camel/test/blueprint/FilterTest.java    |  63 +++
 .../java/org/apache/camel/test/blueprint/Foo.java  |  39 ++
 .../org/apache/camel/test/blueprint/FooBar.java    |  27 +
 .../apache/camel/test/blueprint/FooService.java    |  53 ++
 .../org/apache/camel/test/blueprint/IEcho.java     |  23 +
 .../camel/test/blueprint/IgnoreDatatypesTest.java  |  45 ++
 .../test/blueprint/InflightRepositoryRefTest.java  |  33 ++
 .../test/blueprint/IsMockEndpointJUnit4Test.java   |  76 +++
 .../blueprint/LoadPropertiesFromBeansTest.java     |  38 ++
 .../apache/camel/test/blueprint/MainNoPidTest.java |  45 ++
 .../camel/test/blueprint/MainNoReloadTest.java     |  49 ++
 .../org/apache/camel/test/blueprint/MainTest.java  |  98 ++++
 .../test/blueprint/MockEndpointsAndSkipTest.java   |  42 ++
 .../apache/camel/test/blueprint/MyCoolBean.java    |  52 ++
 .../camel/test/blueprint/MyInflightRepository.java |  23 +
 .../apache/camel/test/blueprint/MyMainAppTest.java |  51 ++
 .../apache/camel/test/blueprint/MyProducer.java    |  34 ++
 .../apache/camel/test/blueprint/MyProperties.java  |  31 ++
 .../org/apache/camel/test/blueprint/MyService.java |  24 +
 .../camel/test/blueprint/MyShutdownStrategy.java   |  31 ++
 ...nExceptionOccurredProcessorOnExceptionTest.java |  57 ++
 .../OnExceptionOccurredProcessorTest.java          |  57 ++
 .../blueprint/OnExceptionRouteIdRouteBuilder.java  |  36 ++
 .../test/blueprint/OnExceptionRouteIdTest.java     |  43 ++
 .../blueprint/PropertiesComponentFunctionTest.java |  53 ++
 .../camel/test/blueprint/PropertyInjectTest.java   |  42 ++
 .../org/apache/camel/test/blueprint/ProxyTest.java |  35 ++
 .../camel/test/blueprint/ShutdownStrategyTest.java |  36 ++
 .../camel/test/blueprint/SimpleMockTest.java       |  37 ++
 .../SimpleTransformAnnotationsBlueprintTest.java   |  61 +++
 .../blueprint/SimpleTransformBlueprintTest.java    |  54 ++
 .../test/blueprint/SimpleWeaveAddMockLastTest.java |  52 ++
 .../test/blueprint/ThreadNamePatternTest.java      |  38 ++
 ...TypeConverterRegistryStatisticsEnabledTest.java |  68 +++
 .../blueprint/builder/AbstractRouteBuilder.java    |  30 ++
 .../test/blueprint/builder/my/MyRouteBuilder.java  |  30 ++
 .../cloud/ServiceCallConfigurationTest.java        |  49 ++
 .../blueprint/cloud/ServiceCallFilterTest.java     |  63 +++
 .../component/rest/DummyRestConsumerFactory.java   |  48 ++
 .../component/rest/FromRestConfigurationTest.java  |  42 ++
 .../rest/FromRestGetEmbeddedRouteTest.java         |  66 +++
 .../component/rest/FromRestGetInterceptTest.java   |  41 ++
 .../component/rest/FromRestGetOnExceptionTest.java |  40 ++
 .../rest/FromRestGetRouteOnExceptionTest.java      |  26 +
 .../blueprint/component/rest/FromRestGetTest.java  | 100 ++++
 .../rest/FromRestIdAndDescriptionTest.java         |  50 ++
 .../component/rest/FromRestUriPrefixTest.java      |  63 +++
 .../test/blueprint/component/rest/RestRefTest.java |  66 +++
 .../converter/CustomConverterRegressionTest.java   |  44 ++
 .../blueprint/converter/CustomConverterTest.java   |  44 ++
 .../test/blueprint/converter/FooConverter.java     |  37 ++
 .../converter/FooConverterRegression.java          |  36 ++
 .../camel/test/blueprint/converter2/Country.java   |  40 ++
 .../test/blueprint/converter2/MyConverters.java    |  36 ++
 .../blueprint/converter2/MyConvertersTest.java     |  40 ++
 .../blueprint/health/HealthCheckRegistryTest.java  |  58 ++
 .../ManagedEndpointInjectRefEndpointTest.java      |  94 ++++
 ...ManagedNamePatternFixedIncludeHostNameTest.java |  57 ++
 .../management/ManagedNamePatternFixedTest.java    |  57 ++
 .../management/ManagedRefEndpointTest.java         |  89 +++
 .../test/blueprint/management/MyRouteBuilder.java  |  35 ++
 .../camel/test/blueprint/scan/MyCoolRoute.java     |  30 ++
 .../test/blueprint/scan2/MyOtherCoolRoute.java     |  35 ++
 .../XPathFilterRouteContextWithNamespaceTest.java  |  26 +
 .../xpath/XPathFilterWithNamespaceTest.java        |  50 ++
 .../test/blueprint/xpath/XPathHeaderNameTest.java  |  65 +++
 .../services/org/apache/camel/TypeConverter        |  18 +
 .../src/test/resources/etc/augmented.fallback.cfg  |  23 +
 .../test/resources/etc/augmented.no.fallback.cfg   |  23 +
 .../src/test/resources/etc/framework.properties    |  19 +
 .../src/test/resources/etc/otherstuff.cfg          |  20 +
 .../src/test/resources/etc/stuff.cfg               |  20 +
 .../src/test/resources/log4j2.properties           |  28 +
 .../camel/test/blueprint/AttributeNewLineTest.xml  |  47 ++
 .../test/blueprint/BlueprintAddServiceTest.xml     |  35 ++
 .../BlueprintComponentPropertyPlaceholderTest.xml  |  47 ++
 .../blueprint/BlueprintMultipleServiceTest.xml     |  35 ++
 .../BlueprintOptionalPropertiesDslTest.xml         |  50 ++
 ...BlueprintProduceConsumeImplicitPropertyTest.xml |  35 ++
 .../BlueprintStreamCachingStrategyTest.xml         |  38 ++
 .../test/blueprint/ConfigAdminExtFileTest.xml      |  69 +++
 .../camel/test/blueprint/CustomIdIssuesTest.xml    |  49 ++
 ...LetterChannelLogExhaustedMessageHistoryTest.xml |  43 ++
 .../DeadLetterChannelOnPrepareTestTest.xml         |  44 ++
 ...tErrorHandlerLogExhaustedMessageHistoryTest.xml |  43 ++
 .../DefaultErrorHandlerOnPrepareTestTest.xml       |  44 ++
 .../camel/test/blueprint/EndpointPropertyTest.xml  |  51 ++
 .../camel/test/blueprint/IsMockEndpoints.xml       |  48 ++
 .../test/blueprint/MockEndpointsAndSkipTest.xml    |  36 ++
 ...OnExceptionOccurredProcessorOnExceptionTest.xml |  48 ++
 .../blueprint/OnExceptionOccurredProcessorTest.xml |  45 ++
 .../test/blueprint/OnExceptionRouteIdTest.xml      |  31 ++
 .../blueprint/PropertiesComponentFunctionTest.xml  |  44 ++
 .../test/blueprint/SimpleWeaveAddMockLastTest.xml  |  38 ++
 .../apache/camel/test/blueprint/beanInjectTest.xml |  35 ++
 .../camel/test/blueprint/beanStaticMethodRoute.xml |  34 ++
 .../apache/camel/test/blueprint/camelContext.xml   |  41 ++
 .../camel/test/blueprint/camelEndpointInject.xml   |  28 +
 .../cloud/ServiceCallConfigurationTest.xml         |  51 ++
 .../test/blueprint/cloud/ServiceCallFilterTest.xml |  54 ++
 .../component/rest/FromRestConfigurationTest.xml   |  85 +++
 .../rest/FromRestGetEmbeddedRouteTest.xml          |  56 ++
 .../component/rest/FromRestGetInterceptTest.xml    |  48 ++
 .../component/rest/FromRestGetOnExceptionTest.xml  |  56 ++
 .../rest/FromRestGetRouteOnExceptionTest.xml       |  55 ++
 .../blueprint/component/rest/FromRestGetTest.xml   |  78 +++
 .../rest/FromRestIdAndDescriptionTest.xml          |  83 +++
 .../component/rest/FromRestUriPrefixTest.xml       |  57 ++
 .../test/blueprint/component/rest/RestRefTest.xml  |  64 +++
 .../blueprint/configadmin-endpoint-no-defaults.xml |  46 ++
 .../camel/test/blueprint/configadmin-endpoint.xml  |  50 ++
 .../camel/test/blueprint/configadmin-loadfile.xml  |  47 ++
 .../blueprint/configadmin-loadfileoverride.xml     |  56 ++
 .../configadmin-loadmultifileoverride.xml          |  80 +++
 .../configadmin-no-reload-default-properties.xml   |  52 ++
 ...admin-no-reload-loadfile-default-properties.xml |  52 ++
 .../blueprint/configadmin-no-reload-loadfile.xml   |  47 ++
 .../configadmin-no-reload-loadfileoverride.xml     |  56 ++
 .../blueprint/configadmin-no-reload-outside.xml    |  52 ++
 .../camel/test/blueprint/configadmin-outside.xml   |  52 ++
 .../apache/camel/test/blueprint/configadmin.xml    |  47 ++
 .../converter/CustomConverterRegressionTest.xml    |  36 ++
 .../blueprint/converter/CustomConverterTest.xml    |  38 ++
 .../test/blueprint/converter2/MyConvertersTest.xml |  32 ++
 .../apache/camel/test/blueprint/default-values.xml |  48 ++
 .../apache/camel/test/blueprint/eventNotifier.xml  |  37 ++
 .../org/apache/camel/test/blueprint/filterTest.xml |  39 ++
 .../blueprint/health/HealthCheckRegistryTest.xml   |  54 ++
 .../camel/test/blueprint/ignoreDatatypes.xml       |  48 ++
 .../test/blueprint/inflightRepositoryRefTest.xml   |  36 ++
 .../test/blueprint/loadPropertiesFromBeans.xml     |  42 ++
 .../apache/camel/test/blueprint/main-loadfile.xml  |  44 ++
 .../camel/test/blueprint/main-no-pid-loadfile.xml  |  49 ++
 .../test/blueprint/main-no-reload-loadfile.xml     |  44 ++
 .../managedEndpointInjectRefEndpointTest.xml       |  35 ++
 .../managedNamePatternFixedIncludeHostNameTest.xml |  40 ++
 .../management/managedNamePatternFixedTest.xml     |  35 ++
 .../management/managedRefEndpointTest.xml          |  36 ++
 .../camel/test/blueprint/myproperties.properties   |  35 ++
 .../apache/camel/test/blueprint/packagescan.xml    |  31 ++
 .../apache/camel/test/blueprint/packagescan2.xml   |  33 ++
 .../apache/camel/test/blueprint/packagescan3.xml   |  29 +
 .../properties-location-element-1.properties       |  18 +
 .../properties-location-element-2.properties       |  18 +
 .../properties-location-element-implicit-test.xml  |  57 ++
 .../properties-location-element-optional-test.xml  |  58 ++
 .../blueprint/properties-location-element-test.xml |  57 ++
 .../camel/test/blueprint/propertyInjectTest.xml    |  36 ++
 .../org/apache/camel/test/blueprint/proxy.xml      |  38 ++
 .../org/apache/camel/test/blueprint/shutdown.xml   |  38 ++
 .../apache/camel/test/blueprint/simpleMockTest.xml |  35 ++
 .../test/blueprint/simpleTransform-context.xml     |  37 ++
 .../simpleTransform-properties-context.xml         |  36 ++
 .../camel/test/blueprint/threadNamePatternTest.xml |  33 ++
 .../typeConverterRegistryStatisticsEnabledTest.xml |  36 ++
 .../test/blueprint/xpath/XPathHeaderNameTest.xml   |  49 ++
 .../xpathFilterRouteContextWithNamespaceTest.xml   |  40 ++
 .../xpath/xpathFilterWithNamespaceTest.xml         |  36 ++
 components/pom.xml                                 |   1 +
 214 files changed, 11293 insertions(+)

diff --git a/components/camel-test-blueprint/pom.xml b/components/camel-test-blueprint/pom.xml
new file mode 100644
index 0000000..aad0690
--- /dev/null
+++ b/components/camel-test-blueprint/pom.xml
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.camel.karaf</groupId>
+        <artifactId>components</artifactId>
+        <version>3.2.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-test-blueprint</artifactId>
+    <packaging>jar</packaging>
+
+    <name>Camel Karaf :: Test :: Blueprint</name>
+    <description>Camel unit testing with OSGi Blueprint</description>
+
+    <properties>
+        <firstVersion>2.10.0</firstVersion>
+        <label>testing,java,osgi</label>
+
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-test</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-main</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-core</artifactId>
+            <type>test-jar</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-cloud</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel</groupId>
+            <artifactId>camel-blueprint</artifactId>
+            <!-- exclude aries blueprint as we add these dependencies explicit -->
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.aries.blueprint</groupId>
+                    <artifactId>org.apache.aries.blueprint.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- the ordering of the dependencies can matter as we load the dependencies from the classpath
+             with felix-connect, and you may get a weird error if wrong order -->
+        <dependency>
+            <groupId>org.apache.aries.proxy</groupId>
+            <artifactId>org.apache.aries.proxy</artifactId>
+            <version>${aries-blueprint-proxy-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries.blueprint</groupId>
+            <artifactId>org.apache.aries.blueprint.cm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.aries</groupId>
+            <artifactId>org.apache.aries.util</artifactId>
+            <version>${aries-util-version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.connect</artifactId>
+            <version>${felix-connect-version}</version>
+            <exclusions>
+                <!-- felix-connect includes osgi.core and osgi.compendium version 5.0.0 -->
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>osgi.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>osgi.cmpn</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.swissbox</groupId>
+            <artifactId>pax-swissbox-tinybundles</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <!-- exclude the following dependency which otherwise would pop up a lot of compilation
+                 errors both by this and the camel-maven-plugin modules under eclipse. -->
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.foundation</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>osgi.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>osgi.cmpn</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.fileinstall</artifactId>
+            <version>${felix-fileinstall-version}</version>
+            <!-- exclude the following dependency which otherwise would pop up a lot of compilation
+                 errors both by this and the camel-maven-plugin modules under eclipse. -->
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.foundation</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>osgi.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>osgi.cmpn</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <!-- optional dependencies for running tests -->
+
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.logging.log4j</groupId>
+            <artifactId>log4j-slf4j-impl</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+</project>
diff --git a/components/camel-test-blueprint/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/components/camel-test-blueprint/src/generated/resources/META-INF/services/org/apache/camel/other.properties
new file mode 100644
index 0000000..883b494
--- /dev/null
+++ b/components/camel-test-blueprint/src/generated/resources/META-INF/services/org/apache/camel/other.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+name=test-blueprint
+groupId=org.apache.camel.karaf
+artifactId=camel-test-blueprint
+version=3.2.0-SNAPSHOT
+projectName=Camel Karaf :: Test :: Blueprint
+projectDescription=Camel unit testing with OSGi Blueprint
diff --git a/components/camel-test-blueprint/src/generated/resources/test-blueprint.json b/components/camel-test-blueprint/src/generated/resources/test-blueprint.json
new file mode 100644
index 0000000..43d9b9f
--- /dev/null
+++ b/components/camel-test-blueprint/src/generated/resources/test-blueprint.json
@@ -0,0 +1,14 @@
+{
+  "other": {
+    "kind": "other",
+    "name": "test-blueprint",
+    "title": "Test Blueprint",
+    "description": "Camel unit testing with OSGi Blueprint",
+    "deprecated": false,
+    "firstVersion": "2.10.0",
+    "label": "testing,java,osgi",
+    "groupId": "org.apache.camel.karaf",
+    "artifactId": "camel-test-blueprint",
+    "version": "3.2.0-SNAPSHOT"
+  }
+}
diff --git a/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc b/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc
new file mode 100644
index 0000000..2aff5c1
--- /dev/null
+++ b/components/camel-test-blueprint/src/main/docs/test-blueprint.adoc
@@ -0,0 +1,189 @@
+= Blueprint Testing
+
+*Since Camel 2.10*
+
+camel-test-blueprint does only support testing _one_ CamelContext. So
+if you have two or more CamelContexts in your blueprint XML files, then
+only the CamelContext first found is used during testing.
+
+Testing is a crucial part of any development or
+integration work. Camel supports the definition of
+Blueprint routes, but given
+that Blueprint is an OSGi specific technology, writing unit tests is
+quite difficult. This library leverages
+http://code.google.com/p/pojosr/[PojoSR] (now Felix Connect) which
+provides a service registry without using a fully compliant OSGi
+container. This allows defining real unit tests (as opposed to
+integration tests using
+http://team.ops4j.org/wiki/display/paxexam/Pax+Exam[Pax Exam]. Please
+make sure all test jars in your classpath are OSGi bundles.
+
+Also notice the use of *`getBlueprintDescriptor`* to specify the
+location of the OSGi Blueprint XML file. +
+ If you have multiple OSGi Blueprint XML files, then you can specify
+them with a comma-separated list in the *`getBlueprintDescriptor`*
+method. Notice that only **one** `CamelContext` is supported per blueprint bundle,
+so if you have multiple XML files then only one of them should have `<camelContext>`.
+
+Here's the XML file]:
+
+[source,xml]
+----
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <transform>
+        <simple>Hello ${body}</simple>
+      </transform>
+      <to uri="mock:a"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+----
+
+In order to define blueprint tests, add the following dependency to your
+pom:
+
+[source,xml]
+-----------------------------------------------
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-test-blueprint</artifactId>
+  <version>2.10</version>
+  <scope>test</scope>
+</dependency>
+-----------------------------------------------
+
+== Classpath scanning
+
+By default PojoSR test container scans the test classpath for all the
+OSGi bundles available there. All the bundles with Blueprint descriptor
+files will be automatically started by the test container. If you would
+like to prevent particular bundles from being started by the test
+container, override the `getBundleFilter` method, just as demonstrated
+in the snippet below. 
+
+[source,java]
+--------------------------------------------------------------------------------
+@Override
+protected String getBundleFilter() {
+  // I don't want test container to scan and load Logback bundle during the test
+  return "(!(Bundle-SymbolicName=ch.qos.logback.core))";
+}
+--------------------------------------------------------------------------------
+
+Keep in mind that not specifying the Blueprint descriptor in the
+getBlueprintDescriptor method will not prevent the test container from
+loading a given descriptor. The `getBundleFilter` method is the proper
+way of filtering out bundles you don't want to start during the test.
+
+== Setting timeout when getting CamelContext
+
+`CamelBlueprintTestSupport` waits 30 seconds for Camel Context to be
+ready by default, now you can override this value in two ways:
+
+* Globally, by setting
+`org.apache.camel.test.blueprint.camelContextCreationTimeout` system
+property.
+* Locally for each test, by overriding _getCamelContextCreationTimeout_
+method.
+
+== Adding services on startup
+
+When using `camel-test-blueprint` you may do unit tests which requires
+using shared services which are not available during unit testing, but
+only in the real OSGi container, for example a shared `DataSource`.
+
+To make it easier to register services on startup, such as a standalone
+`DataSource` or any other service, you can override the method
+`addServicesOnStartup` when your unit test class extends
+`CamelBlueprintTestSupport`.
+
+In the example below we register a service
+`org.apache.camel.test.blueprint.MyService` using the name `myService`
+having a property `beer=Carlsberg`, as shown below:
+
+[source,java]
+---------------------------------------------------------------------------------------------------
+    @Override
+    protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
+        services.put("myService", asService(myService, "beer", "Carlsberg"));
+    }
+---------------------------------------------------------------------------------------------------
+
+The asService is a builder method that makes it easy to register a
+service with a single property. If you need more properties you can use
+the `asService` method that takes a `Dictionary` as argument. And if you
+do not need any properties, then just pass in `null`, eg:
+
+[source,java]
+------------------------------------------------------
+services.put("myService", asService(myService, null));
+------------------------------------------------------
+
+This allows us to use the service by calling a method on it from a Camel
+xref:bean-component.adoc[Bean] component in a route as shown:
+
+[source,xml]
+--------------------------------
+    <route>
+      <from uri="direct:start"/>
+      <to uri="bean:myService"/>
+      <to uri="mock:result"/>
+    </route>
+--------------------------------
+
+Notice the bean endpoint uses the service name `myService` which was the
+name we registered the service as. You can also use the fully qualified
+class name instead, which is more common with OSGi.
+
+[source,java]
+---------------------------------------------------------------------------------------------------
+    @Override
+    protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
+        services.put(MyService.class.getName(), asService(myService, "beer", "Carlsberg"));
+    }
+---------------------------------------------------------------------------------------------------
+
+And in the route we use the FQN name:
+
+[source,xml]
+----------------------------------------------------------------
+    <route>
+      <from uri="direct:start"/>
+      <to uri="bean:org.apache.camel.test.blueprint.MyService"/>
+      <to uri="mock:result"/>
+    </route>
+----------------------------------------------------------------
+
+An additional `addServicesOnStartup` method is
+available to be overridden making it ideal for when needing to specify
+multiple services with the same interface. 
+
+[source,java]
+------------------------------------------------------------------------------------------------------------------
+  @Override
+  protected void addServicesOnStartup(List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> services) {
+      Dictionary<String, String> dict1 = new Hashtable<String, String>();
+      dict1.put("osgi.jndi.service.name", "jdbc/db1");
+        
+      Dictionary<String, String> dict2 = new Hashtable<String, String>();
+      dict2.put("osgi.jndi.service.name", "jdbc/db2");
+        
+      services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService1, dict1));
+      services.add(asKeyValueService(javax.sql.DataSource.class.getName(), mockService2, dict2));
+    }
+------------------------------------------------------------------------------------------------------------------
+
+The `asKeyValueService` builder method can be used to construct the
+necessary parameters to create the service. The method takes in the name
+of the registered service, the object, and and a `Dictionary` as
+arguments.
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
new file mode 100644
index 0000000..08f742d
--- /dev/null
+++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintHelper.java
@@ -0,0 +1,595 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.jar.JarInputStream;
+
+import org.apache.camel.impl.engine.DefaultClassResolver;
+import org.apache.camel.spi.ClassResolver;
+import org.apache.camel.support.ObjectHelper;
+import org.apache.camel.support.ResourceHelper;
+import org.apache.camel.util.FileUtil;
+import org.apache.camel.util.IOHelper;
+import org.apache.felix.connect.PojoServiceRegistryFactoryImpl;
+import org.apache.felix.connect.felix.framework.util.Util;
+import org.apache.felix.connect.launch.BundleDescriptor;
+import org.apache.felix.connect.launch.ClasspathScanner;
+import org.apache.felix.connect.launch.PojoServiceRegistry;
+import org.apache.felix.connect.launch.PojoServiceRegistryFactory;
+import org.ops4j.pax.swissbox.tinybundles.core.TinyBundle;
+import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.SynchronousBundleListener;
+import org.osgi.service.blueprint.container.BlueprintEvent;
+import org.osgi.service.blueprint.container.BlueprintListener;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.camel.test.junit4.TestSupport.createDirectory;
+import static org.apache.camel.test.junit4.TestSupport.deleteDirectory;
+
+/**
+ * Helper for using Blueprint with Camel.
+ */
+public final class CamelBlueprintHelper {
+
+    public static final long DEFAULT_TIMEOUT = 30000;
+    public static final String BUNDLE_FILTER = "(Bundle-SymbolicName=*)";
+    public static final String BUNDLE_VERSION = "1.0.0";
+    private static final Logger LOG = LoggerFactory.getLogger(CamelBlueprintHelper.class);
+    private static final ClassResolver RESOLVER = new DefaultClassResolver();
+
+    private CamelBlueprintHelper() {
+    }
+
+    public static BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle) throws Exception {
+        return createBundleContext(name, descriptors, includeTestBundle, BUNDLE_FILTER, BUNDLE_VERSION);
+    }
+
+    public static BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle,
+                                                    String bundleFilter, String testBundleVersion) throws Exception {
+        return createBundleContext(name, descriptors, includeTestBundle, bundleFilter, testBundleVersion, null);
+    }
+    
+    public static BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle,
+                                                    String bundleFilter, String testBundleVersion, String testBundleDirectives,
+                                                    String[]... configAdminPidFiles) throws Exception {
+        return createBundleContext(name, descriptors, includeTestBundle,
+                bundleFilter, testBundleVersion, testBundleDirectives,
+                null,
+                configAdminPidFiles);
+    }
+
+    public static BundleContext createBundleContext(String name, String descriptors, boolean includeTestBundle,
+                                                    String bundleFilter, String testBundleVersion, String testBundleDirectives,
+                                                    ClassLoader loader,
+                                                    String[]... configAdminPidFiles) throws Exception {
+        TinyBundle bundle = null;
+        TinyBundle configAdminInitBundle = null;
+
+        if (includeTestBundle) {
+            // add ourselves as a bundle
+            bundle = createTestBundle(testBundleDirectives == null ? name : name + ';' + testBundleDirectives,
+                    testBundleVersion, descriptors);
+        }
+        if (configAdminPidFiles != null) {
+            configAdminInitBundle = createConfigAdminInitBundle(configAdminPidFiles);
+        }
+
+        return createBundleContext(name, bundleFilter, bundle, configAdminInitBundle, loader);
+    }
+
+    public static BundleContext createBundleContext(String name, String bundleFilter, TinyBundle bundle) throws Exception {
+        return createBundleContext(name, bundleFilter, bundle, null, null);
+    }
+
+    public static BundleContext createBundleContext(String name, String bundleFilter,
+                                                    TinyBundle bundle, TinyBundle configAdminInitBundle,
+                                                    ClassLoader loader) throws Exception {
+        // ensure felix-connect stores bundles in an unique target directory
+        String uid = "" + System.currentTimeMillis();
+        String tempDir = "target/bundles/" + uid;
+        System.setProperty("org.osgi.framework.storage", tempDir);
+        createDirectory(tempDir);
+
+        // use another directory for the jar of the bundle as it cannot be in the same directory
+        // as it has a file lock during running the tests which will cause the temp dir to not be
+        // fully deleted between tests
+        createDirectory("target/test-bundles");
+
+        List<BundleDescriptor> bundles = new LinkedList<>();
+
+        if (configAdminInitBundle != null) {
+            String jarName = "configAdminInitBundle-" + uid + ".jar";
+            bundles.add(getBundleDescriptor("target/test-bundles/" + jarName, configAdminInitBundle));
+        }
+
+        if (bundle != null) {
+            String jarName = name.toLowerCase(Locale.ENGLISH) + "-" + uid + ".jar";
+            bundles.add(getBundleDescriptor("target/test-bundles/" + jarName, bundle));
+        }
+
+        List<BundleDescriptor> bundleDescriptors = getBundleDescriptors(bundleFilter, loader);
+        // let's put configadmin before blueprint.core
+        int idx1 = -1;
+        int idx2 = -1;
+        for (int i = 0; i < bundleDescriptors.size(); i++) {
+            BundleDescriptor bd = bundleDescriptors.get(i);
+            if ("org.apache.felix.configadmin".equals(bd.getHeaders().get("Bundle-SymbolicName"))) {
+                idx1 = i;
+            }
+            if ("org.apache.aries.blueprint.core".equals(bd.getHeaders().get("Bundle-SymbolicName"))) {
+                idx2 = i;
+            }
+        }
+        if (idx1 >= 0 && idx2 >= 0 && idx1 > idx2) {
+            bundleDescriptors.add(idx2, bundleDescriptors.remove(idx1));
+        }
+
+        // get the bundles
+        bundles.addAll(bundleDescriptors);
+
+        if (LOG.isDebugEnabled()) {
+            for (int i = 0; i < bundles.size(); i++) {
+                BundleDescriptor desc = bundles.get(i);
+                LOG.debug("Bundle #{} -> {}", i, desc);
+            }
+        }
+
+        // setup felix-connect to use our bundles
+        Map<String, Object> config = new HashMap<>();
+        config.put(PojoServiceRegistryFactory.BUNDLE_DESCRIPTORS, bundles);
+
+        // create pojorsr osgi service registry
+        PojoServiceRegistry reg = new PojoServiceRegistryFactoryImpl().newPojoServiceRegistry(config);
+        return reg.getBundleContext();
+    }
+
+    public static void disposeBundleContext(BundleContext bundleContext) throws BundleException {
+        try {
+            if (bundleContext != null) {
+                List<Bundle> bundles = new ArrayList<>();
+                bundles.addAll(Arrays.asList(bundleContext.getBundles()));
+                Collections.reverse(bundles);
+                for (Bundle bundle : bundles) {
+                    LOG.debug("Stopping bundle {}", bundle);
+                    bundle.stop();
+                }
+            }
+        } catch (Exception e) {
+            IllegalStateException ise = org.apache.camel.util.ObjectHelper.getException(IllegalStateException.class, e);
+            if (ise != null) {
+                // we dont care about illegal state exception as that may happen from OSGi
+                LOG.debug("Error during disposing BundleContext. This exception will be ignored.", e);
+            } else {
+                LOG.warn("Error during disposing BundleContext. This exception will be ignored.", e);
+            }
+        } finally {
+            String tempDir = System.clearProperty("org.osgi.framework.storage");
+            if (tempDir != null) {
+                LOG.info("Deleting work directory {}", tempDir);
+                deleteDirectory(tempDir);
+            }
+        }
+    }
+    
+    // pick up persistent file configuration
+    @SuppressWarnings({"unchecked", "rawtypes"})
+    public static void setPersistentFileForConfigAdmin(BundleContext bundleContext, String pid,
+                                                       String fileName, final Dictionary props,
+                                                       String symbolicName, Set<Long> bpEvents,
+                                                       boolean expectReload) throws IOException, InterruptedException {
+        if (pid != null) {
+            if (fileName == null) {
+                throw new IllegalArgumentException("The persistent file should not be null");
+            } else {
+                File load = new File(fileName);
+                LOG.debug("Loading properties from OSGi config admin file: {}", load);
+                org.apache.felix.utils.properties.Properties cfg = new org.apache.felix.utils.properties.Properties(load);
+                for (Object key : cfg.keySet()) {
+                    props.put(key, cfg.get(key));
+                }
+
+                ConfigurationAdmin configAdmin = CamelBlueprintHelper
+                    .getOsgiService(bundleContext, ConfigurationAdmin.class);
+                if (configAdmin != null) {
+                    // ensure we update
+                    // we *have to* use "null" as 2nd arg to have correct bundle location for Configuration object
+                    final Configuration config = configAdmin.getConfiguration(pid, null);
+                    LOG.info("Updating ConfigAdmin {} by overriding properties {}", config, props);
+                    // we may have update and in consequence, BP container reload, let's wait for it to
+                    // be CREATED again
+                    if (expectReload) {
+                        CamelBlueprintHelper.waitForBlueprintContainer(bpEvents, bundleContext, symbolicName, BlueprintEvent.CREATED, new Runnable() {
+                            @Override
+                            public void run() {
+                                try {
+                                    config.update(props);
+                                } catch (IOException e) {
+                                    throw new RuntimeException(e.getMessage(), e);
+                                }
+                            }
+                        });
+                    } else {
+                        config.update(props);
+                    }
+                }
+
+            }
+        }
+    }
+
+    public static <T> T getOsgiService(BundleContext bundleContext, Class<T> type, long timeout) {
+        return getOsgiService(bundleContext, type, null, timeout);
+    }
+
+    public static <T> T getOsgiService(BundleContext bundleContext, Class<T> type) {
+        return getOsgiService(bundleContext, type, null, DEFAULT_TIMEOUT);
+    }
+
+    public static <T> T getOsgiService(BundleContext bundleContext, Class<T> type, String filter) {
+        return getOsgiService(bundleContext, type, filter, DEFAULT_TIMEOUT);
+    }
+
+    public static <T> T getOsgiService(BundleContext bundleContext, Class<T> type, String filter, long timeout) {
+        ServiceTracker<T, T> tracker = null;
+        try {
+            String flt;
+            if (filter != null) {
+                if (filter.startsWith("(")) {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")" + filter + ")";
+                } else {
+                    flt = "(&(" + Constants.OBJECTCLASS + "=" + type.getName() + ")(" + filter + "))";
+                }
+            } else {
+                flt = "(" + Constants.OBJECTCLASS + "=" + type.getName() + ")";
+            }
+            Filter osgiFilter = FrameworkUtil.createFilter(flt);
+            tracker = new ServiceTracker<>(bundleContext, osgiFilter, null);
+            tracker.open(true);
+            // Note that the tracker is not closed to keep the reference
+            // This is buggy, as the service reference may change i think
+            Object svc = tracker.waitForService(timeout);
+
+            if (svc == null) {
+                Dictionary<?, ?> dic = bundleContext.getBundle().getHeaders();
+                LOG.warn("Test bundle headers: " + explode(dic));
+
+                for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, null))) {
+                    LOG.warn("ServiceReference: " + ref + ", bundle: " + ref.getBundle() + ", symbolicName: " + ref.getBundle().getSymbolicName());
+                }
+
+                for (ServiceReference ref : asCollection(bundleContext.getAllServiceReferences(null, flt))) {
+                    LOG.warn("Filtered ServiceReference: " + ref + ", bundle: " + ref.getBundle() + ", symbolicName: " + ref.getBundle().getSymbolicName());
+                }
+
+                throw new RuntimeException("Gave up waiting for service " + flt);
+            }
+            return type.cast(svc);
+        } catch (InvalidSyntaxException e) {
+            throw new IllegalArgumentException("Invalid filter", e);
+        } catch (InterruptedException e) {
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * Synchronization method to wait for particular state of BlueprintContainer under test.
+     */
+    public static void waitForBlueprintContainer(final Set<Long> eventHistory, BundleContext context,
+                                                 final String symbolicName, final int bpEvent, final Runnable runAndWait)
+        throws InterruptedException {
+        final CountDownLatch latch = new CountDownLatch(1);
+        final Throwable[] pThrowable = new Throwable[] {null};
+        ServiceRegistration<BlueprintListener> registration = context.registerService(BlueprintListener.class, new BlueprintListener() {
+            @Override
+            public void blueprintEvent(BlueprintEvent event) {
+                if (event.getBundle().getSymbolicName().equals(symbolicName)) {
+                    if (event.getType() == bpEvent) {
+                        // we skip events that we've already seen
+                        // it works with BP container reloads if next CREATE state is at least 1ms after previous one
+                        if (eventHistory == null || eventHistory.add(event.getTimestamp())) {
+                            latch.countDown();
+                        }
+                    } else if (event.getType() == BlueprintEvent.FAILURE) {
+                        // we didn't wait for FAILURE, but we got it - fail fast then
+                        pThrowable[0] = event.getCause();
+                        latch.countDown();
+                    }
+                }
+            }
+        }, null);
+        if (runAndWait != null) {
+            runAndWait.run();
+        }
+        boolean found = latch.await(CamelBlueprintHelper.DEFAULT_TIMEOUT, TimeUnit.MILLISECONDS);
+        registration.unregister();
+
+        if (!found) {
+            throw new RuntimeException("Gave up waiting for BlueprintContainer from bundle \"" + symbolicName + "\"");
+        }
+
+        if (pThrowable[0] != null) {
+            throw new RuntimeException(pThrowable[0].getMessage(), pThrowable[0]);
+        }
+    }
+
+    protected static TinyBundle createConfigAdminInitBundle(String[]... configAdminPidFiles) throws IOException {
+        TinyBundle bundle = TinyBundles.newBundle();
+        StringWriter configAdminInit = null;
+        for (String[] configAdminPidFile : configAdminPidFiles) {
+            if (configAdminPidFile == null) {
+                continue;
+            }
+            if (configAdminInit == null) {
+                configAdminInit = new StringWriter();
+            } else {
+                configAdminInit.append(',');
+            }
+            configAdminInit.append(configAdminPidFile[1]).append("=");
+            configAdminInit.append(new File(configAdminPidFile[0]).toURI().toString());
+        }
+        bundle.add(TestBundleActivator.class);
+        bundle.add(Util.class);
+        bundle.set("Manifest-Version", "2")
+                .set("Bundle-ManifestVersion", "2")
+                .set("Bundle-SymbolicName", "ConfigAdminInit")
+                .set("Bundle-Version", BUNDLE_VERSION)
+                .set("Bundle-Activator", TestBundleActivator.class.getName());
+
+        if (configAdminInit != null) {
+            bundle.set("X-Camel-Blueprint-ConfigAdmin-Init", configAdminInit.toString());
+        }
+
+        return bundle;
+    }
+
+    protected static TinyBundle createTestBundle(String name, String version, String descriptors) throws IOException {
+        TinyBundle bundle = TinyBundles.newBundle();
+        for (URL url : getBlueprintDescriptors(descriptors)) {
+            LOG.info("Using Blueprint XML file: " + url.getFile());
+            bundle.add("OSGI-INF/blueprint/blueprint-" + url.getFile().replace("/", "-"), url);
+        }
+        bundle.set("Manifest-Version", "2")
+                .set("Bundle-ManifestVersion", "2")
+                .set("Bundle-SymbolicName", name)
+                .set("Bundle-Version", version);
+
+        return bundle;
+    }
+
+    /**
+     * Explode the dictionary into a <code>,</code> delimited list of <code>key=value</code> pairs.
+     */
+    private static String explode(Dictionary<?, ?> dictionary) {
+        Enumeration<?> keys = dictionary.keys();
+        StringBuilder result = new StringBuilder();
+        while (keys.hasMoreElements()) {
+            Object key = keys.nextElement();
+            result.append(String.format("%s=%s", key, dictionary.get(key)));
+            if (keys.hasMoreElements()) {
+                result.append(", ");
+            }
+        }
+        return result.toString();
+    }
+
+    /**
+     * Provides an iterable collection of references, even if the original array is <code>null</code>.
+     */
+    private static Collection<ServiceReference> asCollection(ServiceReference[] references) {
+        return references  == null ? new ArrayList<>(0) : Arrays.asList(references);
+    }
+
+    /**
+     * Gets list of bundle descriptors.
+     * @param bundleFilter Filter expression for OSGI bundles.
+     *
+     * @return List pointers to OSGi bundles.
+     * @throws Exception If looking up the bundles fails.
+     */
+    private static List<BundleDescriptor> getBundleDescriptors(final String bundleFilter, ClassLoader loader) throws Exception {
+        return new ClasspathScanner().scanForBundles(bundleFilter, loader);
+    }
+
+    /**
+     * Gets the bundle descriptors as {@link URL} resources.
+     *
+     * @param descriptors the bundle descriptors, can be separated by comma
+     * @return the bundle descriptors.
+     * @throws FileNotFoundException is thrown if a bundle descriptor cannot be found
+     */
+    protected static Collection<URL> getBlueprintDescriptors(String descriptors) throws FileNotFoundException, MalformedURLException {
+        List<URL> answer = new ArrayList<>();
+        if (descriptors != null) {
+            // there may be more resources separated by comma
+            Iterator<?> it = ObjectHelper.createIterator(descriptors);
+            while (it.hasNext()) {
+                String s = (String) it.next();
+                LOG.trace("Resource descriptor: {}", s);
+
+                // remove leading / to be able to load resource from the classpath
+                s = FileUtil.stripLeadingSeparator(s);
+
+                // if there is wildcards for *.xml then we need to find the urls from the package
+                if (s.endsWith("*.xml")) {
+                    String packageName = s.substring(0, s.length() - 5);
+                    // remove trailing / to be able to load resource from the classpath
+                    Enumeration<URL> urls = org.apache.camel.util.ObjectHelper.loadResourcesAsURL(packageName);
+                    while (urls.hasMoreElements()) {
+                        URL url = urls.nextElement();
+                        File dir = new File(url.getFile());
+                        if (dir.isDirectory()) {
+                            File[] files = dir.listFiles();
+                            if (files != null) {
+                                for (File file : files) {
+                                    if (file.isFile() && file.exists() && file.getName().endsWith(".xml")) {
+                                        String name = packageName + file.getName();
+                                        LOG.debug("Resolving resource: {}", name);
+                                        URL xmlUrl = org.apache.camel.util.ObjectHelper.loadResourceAsURL(name);
+                                        if (xmlUrl != null) {
+                                            answer.add(xmlUrl);
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                } else {
+                    LOG.debug("Resolving resource: {}", s);
+                    URL url = ResourceHelper.resolveMandatoryResourceAsUrl(RESOLVER, s);
+                    if (url == null) {
+                        throw new FileNotFoundException("Resource " + s + " not found");
+                    }
+                    answer.add(url);
+                }
+            }
+        } else {
+            throw new IllegalArgumentException("No bundle descriptor configured. Override getBlueprintDescriptor() or getBlueprintDescriptors() method");
+        }
+
+        if (answer.isEmpty()) {
+            throw new IllegalArgumentException("Cannot find any resources in classpath from descriptor " + descriptors);
+        }
+        return answer;
+    }
+
+    private static BundleDescriptor getBundleDescriptor(String path, TinyBundle bundle) throws Exception {
+        File file = new File(path);
+        // tell the JVM its okay to delete this file on exit as its a temporary file
+        // the JVM may not successfully delete the file though
+        file.deleteOnExit();
+
+        FileOutputStream fos = new FileOutputStream(file, false);
+        InputStream is = bundle.build();
+        try {
+            IOHelper.copyAndCloseInput(is, fos);
+        } finally {
+            IOHelper.close(is, fos);
+        }
+
+        BundleDescriptor answer = null;
+        FileInputStream fis = null;
+        JarInputStream jis = null;
+        try {
+            fis = new FileInputStream(file);
+            jis = new JarInputStream(fis);
+            Map<String, String> headers = new HashMap<>();
+            for (Map.Entry<Object, Object> entry : jis.getManifest().getMainAttributes().entrySet()) {
+                headers.put(entry.getKey().toString(), entry.getValue().toString());
+            }
+
+            answer = new BundleDescriptor(
+                    bundle.getClass().getClassLoader(),
+                    "jar:" + file.toURI().toString() + "!/",
+                    headers);
+        } finally {
+            IOHelper.close(jis, fis);
+        }
+
+        return answer;
+    }
+
+    /**
+     * Bundle activator that will be invoked in right time to set initial configadmin configuration
+     * for blueprint container.
+     */
+    public static class TestBundleActivator implements BundleActivator {
+        @Override
+        public void start(BundleContext bundleContext) throws Exception {
+            final String configAdminInit = bundleContext.getBundle().getHeaders().get("X-Camel-Blueprint-ConfigAdmin-Init");
+            if (configAdminInit != null) {
+                final BundleContext sysContext = bundleContext.getBundle(0).getBundleContext();
+                // we are started before blueprint.core and felix.configadmin
+                // we are sure that felix.configadmin is started before blueprint.core
+                sysContext.addBundleListener(new SynchronousBundleListener() {
+                    @Override
+                    public void bundleChanged(BundleEvent event) {
+                        if (event.getType() == BundleEvent.STARTED
+                                && "org.apache.felix.configadmin".equals(event.getBundle().getSymbolicName())) {
+                            // configadmin should have already been started
+                            ServiceReference<?> sr = sysContext.getServiceReference("org.osgi.service.cm.ConfigurationAdmin");
+                            if (sr != null && sysContext.getService(sr) != null) {
+                                initializeConfigAdmin(sysContext, configAdminInit);
+                            }
+                        }
+                    }
+                });
+            }
+        }
+
+        private void initializeConfigAdmin(BundleContext context, String configAdminInit) {
+            String[] pidFiles = configAdminInit.split(",");
+            for (String pidFile : pidFiles) {
+                String[] pf = pidFile.split("=");
+                try {
+                    CamelBlueprintHelper.setPersistentFileForConfigAdmin(context, pf[0], new URI(pf[1]).getPath(),
+                            new Properties(), null, null, false);
+                } catch (IOException | URISyntaxException e) {
+                    throw new RuntimeException(e.getMessage(), e);
+                } catch (InterruptedException e) {
+                    Thread.currentThread().interrupt();
+                    throw new RuntimeException(e.getMessage(), e);
+                }
+            }
+        }
+
+        @Override
+        public void stop(BundleContext bundleContext) throws Exception {
+        }
+    }
+}
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
new file mode 100644
index 0000000..c691415
--- /dev/null
+++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/CamelBlueprintTestSupport.java
@@ -0,0 +1,547 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.aries.blueprint.compendium.cm.CmNamespaceHandler;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.properties.PropertiesComponent;
+import org.apache.camel.model.ModelCamelContext;
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.IOHelper;
+import org.apache.camel.util.KeyValueHolder;
+import org.junit.After;
+import org.junit.Before;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.blueprint.container.BlueprintEvent;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+/**
+ * Base class for OSGi Blueprint unit tests with Camel
+ */
+public abstract class CamelBlueprintTestSupport extends CamelTestSupport {
+    /** Name of a system property that sets camel context creation timeout. */
+    public static final String SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT = "org.apache.camel.test.blueprint.camelContextCreationTimeout";
+
+    private static ThreadLocal<BundleContext> threadLocalBundleContext = new ThreadLocal<>();
+    private volatile BundleContext bundleContext;
+    private final Set<ServiceRegistration<?>> services = new LinkedHashSet<>();
+
+    /**
+     * Override this method if you don't want CamelBlueprintTestSupport create the test bundle
+     * @return includeTestBundle
+     * If the return value is true CamelBlueprintTestSupport creates the test bundle which includes blueprint configuration files
+     * If the return value is false CamelBlueprintTestSupport won't create the test bundle
+     */
+    protected boolean includeTestBundle() {
+        return true;
+    }
+
+    /**
+     * <p>Override this method if you want to start Blueprint containers asynchronously using the thread
+     * that starts the bundles itself.
+     * By default this method returns <code>true</code> which means Blueprint Extender will use thread pool
+     * (threads named "<code>Blueprint Extender: N</code>") to startup Blueprint containers.</p>
+     * <p>Karaf and Fuse OSGi containers use synchronous startup.</p>
+     * <p>Asynchronous startup is more in the <em>spirit</em> of OSGi and usually means that if everything works fine
+     * asynchronously, it'll work synchronously as well. This isn't always true otherwise.</p>
+     * @return <code>true</code> when blueprint containers are to be started asynchronously, otherwise <code>false</code>.
+     */
+    protected boolean useAsynchronousBlueprintStartup() {
+        return true;
+    }
+
+    @SuppressWarnings({"rawtypes", "unchecked"})
+    protected BundleContext createBundleContext() throws Exception {
+        System.setProperty("org.apache.aries.blueprint.synchronous", Boolean.toString(!useAsynchronousBlueprintStartup()));
+
+        // load configuration file
+        String[] file = loadConfigAdminConfigurationFile();
+        String[][] configAdminPidFiles = new String[0][0];
+        if (file != null) {
+            if (file.length % 2 != 0) {  // This needs to return pairs of filename and pid
+                throw new IllegalArgumentException("The length of the String[] returned from loadConfigAdminConfigurationFile must divisible by 2, was " + file.length);
+            }
+            configAdminPidFiles = new String[file.length / 2][2];
+
+            int pair = 0;
+            for (int i = 0; i < file.length; i += 2) {
+                String fileName = file[i];
+                String pid = file[i + 1];
+                if (!new File(fileName).exists()) {
+                    throw new IllegalArgumentException("The provided file \"" + fileName + "\" from loadConfigAdminConfigurationFile doesn't exist");
+                }
+                configAdminPidFiles[pair][0] = fileName;
+                configAdminPidFiles[pair][1] = pid;
+                pair++;
+            }
+        }
+
+        // fetch initial configadmin configuration if provided programmatically
+        Properties initialConfiguration = new Properties();
+        String pid = setConfigAdminInitialConfiguration(initialConfiguration);
+        if (pid != null) {
+            configAdminPidFiles = new String[][]{{prepareInitialConfigFile(initialConfiguration), pid}};
+        }
+
+        final String symbolicName = getClass().getSimpleName();
+        final BundleContext answer = CamelBlueprintHelper.createBundleContext(symbolicName, getBlueprintDescriptor(),
+            includeTestBundle(), getBundleFilter(), getBundleVersion(), getBundleDirectives(), configAdminPidFiles);
+
+        boolean expectReload = expectBlueprintContainerReloadOnConfigAdminUpdate();
+
+        // must register override properties early in OSGi containers
+        extra = useOverridePropertiesWithPropertiesComponent();
+        if (extra != null) {
+            answer.registerService(PropertiesComponent.OVERRIDE_PROPERTIES, extra, null);
+        }
+
+        Map<String, KeyValueHolder<Object, Dictionary>> map = new LinkedHashMap<>();
+        addServicesOnStartup(map);
+
+        List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> servicesList = new LinkedList<>();
+        for (Map.Entry<String, KeyValueHolder<Object, Dictionary>> entry : map.entrySet()) {
+            servicesList.add(asKeyValueService(entry.getKey(), entry.getValue().getKey(), entry.getValue().getValue()));
+        }
+
+        addServicesOnStartup(servicesList);
+
+        for (KeyValueHolder<String, KeyValueHolder<Object, Dictionary>> item : servicesList) {
+            String clazz = item.getKey();
+            Object service = item.getValue().getKey();
+            Dictionary dict = item.getValue().getValue();
+            log.debug("Registering service {} -> {}", clazz, service);
+            ServiceRegistration<?> reg = answer.registerService(clazz, service, dict);
+            if (reg != null) {
+                services.add(reg);
+            }
+        }
+
+        // if blueprint XML uses <cm:property-placeholder> (any update-strategy and any default properties)
+        // - org.apache.aries.blueprint.compendium.cm.ManagedObjectManager.register() is called
+        // - ManagedServiceUpdate is scheduled in felix.cm
+        // - org.apache.felix.cm.impl.ConfigurationImpl.setDynamicBundleLocation() is called
+        // - CM_LOCATION_CHANGED event is fired
+        // - if BP was alredy created, it's <cm:property-placeholder> receives the event and
+        // - org.apache.aries.blueprint.compendium.cm.CmPropertyPlaceholder.updated() is called,
+        //   but no BP reload occurs
+        // we will however wait for BP container of the test bundle to become CREATED for the first time
+        // each configadmin update *may* lead to reload of BP container, if it uses <cm:property-placeholder>
+        // with update-strategy="reload"
+
+        // we will gather timestamps of BP events. We don't want to be fooled but repeated events related
+        // to the same state of BP container
+        Set<Long> bpEvents = new HashSet<>();
+
+        CamelBlueprintHelper.waitForBlueprintContainer(bpEvents, answer, symbolicName, BlueprintEvent.CREATED, null);
+
+        // must reuse props as we can do both load from .cfg file and override afterwards
+        final Dictionary props = new Properties();
+
+        // allow end user to override properties
+        pid = useOverridePropertiesWithConfigAdmin(props);
+        if (pid != null) {
+            // we will update the configuration again
+            ConfigurationAdmin configAdmin = CamelBlueprintHelper.getOsgiService(answer, ConfigurationAdmin.class);
+            // passing null as second argument ties the configuration to correct bundle.
+            // using single-arg method causes:
+            // *ERROR* Cannot use configuration xxx.properties for [org.osgi.service.cm.ManagedService, id=N, bundle=N/jar:file:xyz.jar!/]: No visibility to configuration bound to felix-connect
+            final Configuration config = configAdmin.getConfiguration(pid, null);
+            if (config == null) {
+                throw new IllegalArgumentException("Cannot find configuration with pid " + pid + " in OSGi ConfigurationAdmin service.");
+            }
+            // lets merge configurations
+            Dictionary<String, Object> currentProperties = config.getProperties();
+            final Dictionary newProps = new Properties();
+            if (currentProperties == null) {
+                currentProperties = newProps;
+            }
+            for (Enumeration<String> ek = currentProperties.keys(); ek.hasMoreElements();) {
+                String k = ek.nextElement();
+                newProps.put(k, currentProperties.get(k));
+            }
+            for (String p : ((Properties) props).stringPropertyNames()) {
+                newProps.put(p, ((Properties) props).getProperty(p));
+            }
+
+            log.info("Updating ConfigAdmin {} by overriding properties {}", config, newProps);
+            if (expectReload) {
+                CamelBlueprintHelper.waitForBlueprintContainer(bpEvents, answer, symbolicName, BlueprintEvent.CREATED, new Runnable() {
+                    @Override
+                    public void run() {
+                        try {
+                            config.update(newProps);
+                        } catch (IOException e) {
+                            throw new RuntimeException(e.getMessage(), e);
+                        }
+                    }
+                });
+            } else {
+                config.update(newProps);
+            }
+        }
+
+        return answer;
+    }
+    
+    /**
+     * This option is not supported / in-use for blueprint
+     */
+    @Deprecated
+    @Override
+    public boolean isCreateCamelContextPerClass() {
+        return false;
+    }
+
+    @Before
+    @Override
+    public void setUp() throws Exception {
+        System.setProperty("skipStartingCamelContext", "true");
+        System.setProperty("registerBlueprintCamelContextEager", "true");
+
+        if (isCreateCamelContextPerClass()) {
+            // test is per class, so only setup once (the first time)
+            boolean first = threadLocalBundleContext.get() == null;
+            if (first) {
+                threadLocalBundleContext.set(createBundleContext());
+            }
+            bundleContext = threadLocalBundleContext.get();
+        } else {
+            bundleContext = createBundleContext();
+        }
+
+        super.setUp();
+
+        // we don't have to wait for BP container's OSGi service - we've already waited
+        // for BlueprintEvent.CREATED
+
+        // start context when we are ready
+        log.debug("Starting CamelContext: {}", context.getName());
+        if (isUseAdviceWith()) {
+            log.info("Skipping starting CamelContext as isUseAdviceWith is set to true.");
+        } else {
+            context.start();
+        }
+    }
+
+    /**
+     * Override this method to add services to be registered on startup.
+     * <p/>
+     * You can use the builder methods {@link #asService(Object, java.util.Dictionary)}, {@link #asService(Object, String, String)}
+     * to make it easy to add the services to the map.
+     */
+    protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
+        // noop
+    }
+
+    /**
+     * This method may be overriden to instruct BP test support that BP container will reloaded when
+     * Config Admin configuration is updated. By default, this is expected, when blueprint XML definition
+     * contains <code>&lt;cm:property-placeholder persistent-id="PID" update-strategy="reload"&gt;</code>
+     */
+    protected boolean expectBlueprintContainerReloadOnConfigAdminUpdate() {
+        boolean expectedReload = false;
+        DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+        dbf.setNamespaceAware(true);
+        try {
+            // cm-1.0 doesn't define update-strategy attribute
+            Set<String> cmNamesaces = new HashSet<>(Arrays.asList(
+                    CmNamespaceHandler.BLUEPRINT_CM_NAMESPACE_1_1,
+                    CmNamespaceHandler.BLUEPRINT_CM_NAMESPACE_1_2,
+                    CmNamespaceHandler.BLUEPRINT_CM_NAMESPACE_1_3
+            ));
+            for (URL descriptor : CamelBlueprintHelper.getBlueprintDescriptors(getBlueprintDescriptor())) {
+                DocumentBuilder db = dbf.newDocumentBuilder();
+                try (InputStream is = descriptor.openStream()) {
+                    Document doc = db.parse(is);
+                    NodeList nl = doc.getDocumentElement().getChildNodes();
+                    for (int i = 0; i < nl.getLength(); i++) {
+                        Node node = nl.item(i);
+                        if (node instanceof Element) {
+                            Element pp = (Element) node;
+                            if (cmNamesaces.contains(pp.getNamespaceURI())) {
+                                String us = pp.getAttribute("update-strategy");
+                                if (us != null && us.equals("reload")) {
+                                    expectedReload = true;
+                                    break;
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage(), e);
+        }
+        return expectedReload;
+    }
+
+    /**
+     * Override this method to add services to be registered on startup.
+     * <p/>
+     * You can use the builder methods {@link #asKeyValueService(String, Object, Dictionary)}
+     * to make it easy to add the services to the List.
+     */
+    protected void addServicesOnStartup(List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> services) {
+        // noop
+    }
+
+    /**
+     * Creates a holder for the given service, which make it easier to use {@link #addServicesOnStartup(java.util.Map)}
+     */
+    protected KeyValueHolder<Object, Dictionary> asService(Object service, Dictionary dict) {
+        return new KeyValueHolder<>(service, dict);
+    }
+
+    /**
+     * Creates a holder for the given service, which make it easier to use {@link #addServicesOnStartup(java.util.List)}
+     */
+    protected KeyValueHolder<String, KeyValueHolder<Object, Dictionary>> asKeyValueService(String name, Object service, Dictionary dict) {
+        return new KeyValueHolder<>(name, new KeyValueHolder<>(service, dict));
+    }
+
+    /**
+     * Creates a holder for the given service, which make it easier to use {@link #addServicesOnStartup(java.util.Map)}
+     */
+    protected KeyValueHolder<Object, Dictionary> asService(Object service, String key, String value) {
+        Properties prop = new Properties();
+        if (key != null && value != null) {
+            prop.put(key, value);
+        }
+        return new KeyValueHolder<>(service, prop);
+    }
+
+    /**
+     * <p>Override this method to override config admin properties. Overriden properties will be passed to
+     * {@link Configuration#update(Dictionary)} and may or may not lead to reload of Blueprint container - this
+     * depends on <code>update-strategy="reload|none"</code> in <code>&lt;cm:property-placeholder&gt;</code></p>
+     * <p>This method should be used to simulate configuration update <strong>after</strong> Blueprint container
+     * is already initialized and started. Don't use this method to initialized ConfigAdmin configuration.</p>
+     *
+     * @param props properties where you add the properties to override
+     * @return the PID of the OSGi {@link ConfigurationAdmin} which are defined in the Blueprint XML file.
+     */
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary<String, String> props) throws Exception {
+        return null;
+    }
+
+    /**
+     * Override this method and provide the name of the .cfg configuration file to use for
+     * ConfigAdmin service. Provided file will be used to initialize ConfigAdmin configuration before Blueprint
+     * container is loaded.
+     *
+     * @return the name of the path for the .cfg file to load, and the persistence-id of the property placeholder.
+     */
+    protected String[] loadConfigAdminConfigurationFile() {
+        return null;
+    }
+
+    /**
+     * Override this method as an alternative to {@link #loadConfigAdminConfigurationFile()} if there's a need
+     * to set initial ConfigAdmin configuration without using files.
+     *
+     * @param props always non-null. Tests may initialize ConfigAdmin configuration by returning PID.
+     * @return persistence-id of the property placeholder. If non-null, <code>props</code> will be used as
+     * initial ConfigAdmin configuration
+     */
+    protected String setConfigAdminInitialConfiguration(Properties props) {
+        return null;
+    }
+
+    @After
+    @Override
+    public void tearDown() throws Exception {
+        System.clearProperty("skipStartingCamelContext");
+        System.clearProperty("registerBlueprintCamelContextEager");
+
+        super.tearDown();
+
+        // unregister services
+        if (bundleContext != null) {
+            for (ServiceRegistration<?> reg : services) {
+                bundleContext.ungetService(reg.getReference());
+            }
+        }
+
+        CamelBlueprintHelper.disposeBundleContext(bundleContext);
+    }
+
+    @Override
+    public void cleanupResources() throws Exception {
+        if (threadLocalBundleContext.get() != null) {
+            CamelBlueprintHelper.disposeBundleContext(threadLocalBundleContext.get());
+            threadLocalBundleContext.remove();
+        }
+        super.cleanupResources();
+    }
+
+    /**
+     * Return the system bundle context
+     */
+    protected BundleContext getBundleContext() {
+        return bundleContext;
+    }
+
+    /**
+     * Gets the bundle descriptor from the classpath.
+     * <p/>
+     * Return the location(s) of the bundle descriptors from the classpath.
+     * Separate multiple locations by comma, or return a single location.
+     * <p/>
+     * Only one CamelContext is supported per blueprint bundle,
+     * so if you have multiple XML files then only one of them should have <tt>&lt;camelContext&gt</tt>.
+     * <p/>
+     * For example override this method and return <tt>OSGI-INF/blueprint/camel-context.xml</tt>
+     *
+     * @return the location of the bundle descriptor file.
+     */
+    protected String getBlueprintDescriptor() {
+        return null;
+    }
+
+    /**
+     * Gets filter expression of bundle descriptors.
+     * Modify this method if you wish to change default behavior.
+     *
+     * @return filter expression for OSGi bundles.
+     */
+    protected String getBundleFilter() {
+        return CamelBlueprintHelper.BUNDLE_FILTER;
+    }
+
+    /**
+     * Gets test bundle version.
+     * Modify this method if you wish to change default behavior.
+     *
+     * @return test bundle version
+     */
+    protected String getBundleVersion() {
+        return CamelBlueprintHelper.BUNDLE_VERSION;
+    }
+
+    /**
+     * Gets the bundle directives.
+     * <p/>
+     * Modify this method if you wish to add some directives.
+     */
+    protected String getBundleDirectives() {
+        return null;
+    }
+    
+    /**
+     * Returns how long to wait for Camel Context
+     * to be created.
+     * 
+     * @return timeout in milliseconds.
+     */
+    protected Long getCamelContextCreationTimeout() {
+        String tm = System.getProperty(SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT);
+        if (tm == null) {
+            return null;
+        }
+        try {
+            Long val = Long.valueOf(tm);
+            if (val < 0) {
+                throw new IllegalArgumentException("Value of " 
+                        + SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT
+                        + " cannot be negative.");
+            }
+            return val;
+        } catch (NumberFormatException e) {
+            throw new IllegalArgumentException("Value of " 
+                    + SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT
+                    + " has wrong format.", e);
+        }
+    }
+    
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext answer = null;
+        Long timeout = getCamelContextCreationTimeout();
+        if (timeout == null) {
+            answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class);
+        } else if (timeout >= 0) {
+            answer = CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class, timeout);
+        } else {
+            throw new IllegalArgumentException("getCamelContextCreationTimeout cannot return a negative value.");
+        }
+        // must override context so we use the correct one in testing
+        context = answer.adapt(ModelCamelContext.class);
+        return answer;
+    }
+   
+
+    protected <T> T getOsgiService(Class<T> type) {
+        return CamelBlueprintHelper.getOsgiService(bundleContext, type);
+    }
+
+    protected <T> T getOsgiService(Class<T> type, long timeout) {
+        return CamelBlueprintHelper.getOsgiService(bundleContext, type, timeout);
+    }
+
+    protected <T> T getOsgiService(Class<T> type, String filter) {
+        return CamelBlueprintHelper.getOsgiService(bundleContext, type, filter);
+    }
+
+    protected <T> T getOsgiService(Class<T> type, String filter, long timeout) {
+        return CamelBlueprintHelper.getOsgiService(bundleContext, type, filter, timeout);
+    }
+
+    /**
+     * Create a temporary File with persisted configuration for ConfigAdmin
+     */
+    private String prepareInitialConfigFile(Properties initialConfiguration) throws IOException {
+        File dir = new File("target/etc");
+        dir.mkdirs();
+        File cfg = Files.createTempFile(dir.toPath(), "properties-", ".cfg").toFile();
+        FileWriter writer = new FileWriter(cfg);
+        try {
+            initialConfiguration.store(writer, null);
+        } finally {
+            IOHelper.close(writer);
+        }
+        return cfg.getAbsolutePath();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java
new file mode 100644
index 0000000..db5efa5
--- /dev/null
+++ b/components/camel-test-blueprint/src/main/java/org/apache/camel/test/blueprint/Main.java
@@ -0,0 +1,199 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.LinkedList;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.main.MainCommandLineSupport;
+import org.osgi.framework.BundleContext;
+
+/**
+ * A command line tool for booting up a CamelContext using an OSGi Blueprint XML file
+ */
+public class Main extends MainCommandLineSupport {
+
+    protected static Main instance;
+    private BundleContext bundleContext;
+    private String descriptors = "OSGI-INF/blueprint/*.xml";
+    private String bundleName = "MyBundle";
+    private boolean includeSelfAsBundle;
+    private String configAdminPid;
+    private String configAdminFileName;
+
+    // ClassLoader used to scan for bundles in CamelBlueprintHelper.createBundleContext()
+    private ClassLoader loader;
+
+    public Main() {
+
+        addOption(new ParameterOption("ac", "applicationContext",
+                "Sets the classpath based OSGi Blueprint", "applicationContext") {
+            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
+                setDescriptors(parameter);
+            }
+        });
+
+        addOption(new ParameterOption("fa", "fileApplicationContext",
+                "Sets the filesystem based OSGi Blueprint", "fileApplicationContext") {
+            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
+                setDescriptors(parameter);
+            }
+        });
+        
+        addOption(new ParameterOption("pid", "configAdminPid", 
+                 "Sets the ConfigAdmin persistentId", "configAdminPid") {
+            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
+                setConfigAdminPid(parameter);
+            }
+        });
+        
+        addOption(new ParameterOption("pf", "configAdminFileName", 
+                  "Sets the ConfigAdmin persistent file name", "configAdminFileName") {
+            protected void doProcess(String arg, String parameter, LinkedList<String> remainingArgs) {
+                setConfigAdminFileName(parameter);
+            }
+        });
+
+    }
+
+    public static void main(String... args) throws Exception {
+        Main main = new Main();
+        main.run(args);
+    }
+
+    /**
+     * Returns the currently executing main
+     *
+     * @return the current running instance
+     */
+    public static Main getInstance() {
+        return instance;
+    }
+
+    @Override
+    protected CamelContext createCamelContext() {
+        return CamelBlueprintHelper.getOsgiService(bundleContext, CamelContext.class);
+    }
+
+    @Override
+    protected void doStart() throws Exception {
+        if (bundleContext == null) {
+            String descriptors = getDescriptors();
+            if (descriptors == null) {
+                throw new IllegalArgumentException("Descriptors must be provided, with the name of the blueprint XML file");
+            }
+            LOG.debug("Starting Blueprint XML file: " + descriptors);
+            if (configAdminPid != null && configAdminFileName != null) {
+                // pid/file is used to set INITIAL content of ConfigAdmin to be used when blueprint container is started
+                bundleContext = createBundleContext(bundleName, new String[] {configAdminFileName, configAdminPid});
+            } else {
+                bundleContext = createBundleContext(bundleName);
+            }
+        }
+        try {
+            super.doStart();
+            initCamelContext();
+        } finally {
+            // if we were veto started then mark as completed
+            if (getCamelContext() != null && getCamelContext().isVetoStarted()) {
+                completed();
+            }
+        }
+    }
+
+    @Override
+    protected void doStop() throws Exception {
+        // stop camel context
+        if (getCamelContext() != null) {
+            getCamelContext().stop();
+        }
+        // and then stop blueprint
+        LOG.debug("Stopping Blueprint XML file: {}", descriptors);
+        CamelBlueprintHelper.disposeBundleContext(bundleContext);
+        // call completed to properly stop as we count down the waiting latch
+        completed();
+    }
+
+    @Override
+    protected ProducerTemplate findOrCreateCamelTemplate() {
+        if (getCamelContext() != null) {
+            return getCamelContext().createProducerTemplate();
+        } else {
+            return null;
+        }
+    }
+
+    protected BundleContext createBundleContext() throws Exception {
+        return createBundleContext(getClass().getSimpleName());
+    }
+
+    protected BundleContext createBundleContext(String name, String[]... configAdminPidFiles) throws Exception {
+        return createBundleContext(name, loader, configAdminPidFiles);
+    }
+
+    protected BundleContext createBundleContext(String name, ClassLoader loader, String[]... configAdminPidFiles) throws Exception {
+        return CamelBlueprintHelper.createBundleContext(name, descriptors, isIncludeSelfAsBundle(),
+                CamelBlueprintHelper.BUNDLE_FILTER, CamelBlueprintHelper.BUNDLE_VERSION, null,
+                loader, configAdminPidFiles);
+    }
+
+    public String getDescriptors() {
+        return descriptors;
+    }
+
+    public void setDescriptors(String descriptors) {
+        this.descriptors = descriptors;
+    }
+
+    public String getBundleName() {
+        return bundleName;
+    }
+
+    public void setBundleName(String bundleName) {
+        this.bundleName = bundleName;
+    }
+
+    public boolean isIncludeSelfAsBundle() {
+        return includeSelfAsBundle;
+    }
+
+    public void setIncludeSelfAsBundle(boolean includeSelfAsBundle) {
+        this.includeSelfAsBundle = includeSelfAsBundle;
+    }
+
+    public String getConfigAdminPid() {
+        return configAdminPid;
+    }
+
+    public void setConfigAdminPid(String pid) {
+        this.configAdminPid = pid;
+    }
+
+    public String getConfigAdminFileName() {
+        return configAdminFileName;
+    }
+
+    public void setConfigAdminFileName(String fileName) {
+        this.configAdminFileName = fileName;
+    }
+
+    public void setLoader(ClassLoader loader) {
+        this.loader = loader;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/AttributeNewLineTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/AttributeNewLineTest.java
new file mode 100644
index 0000000..14f1dbf
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/AttributeNewLineTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class AttributeNewLineTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/AttributeNewLineTest.xml";
+    }
+
+    @Test
+    public void testAttributeNewLineTest() throws Exception {
+        getMockEndpoint("mock:bar").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+
+        Object stub = context.hasEndpoint("stub:GET    /v1/phonebook/companies/{companyCode}?oauth=OPTIONAL");
+        assertNotNull("Should have stub endpoint with double spaces", stub);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanInjectTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanInjectTest.java
new file mode 100644
index 0000000..9f64609
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanInjectTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class BeanInjectTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/beanInjectTest.xml";
+    }
+
+    @Test
+    public void testBeanInject() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanStaticMethodTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanStaticMethodTest.java
new file mode 100644
index 0000000..7196a0c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BeanStaticMethodTest.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class BeanStaticMethodTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/beanStaticMethodRoute.xml";
+    }
+
+    @Test
+    public void testStaticMethod() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:result").message(0).exchangeProperty("foo").isNotNull();
+        getMockEndpoint("mock:result").message(0).exchangeProperty("bar").isNotNull();
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintAddServiceTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintAddServiceTest.java
new file mode 100644
index 0000000..6c902a4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintAddServiceTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+import java.util.Map;
+
+import org.apache.camel.util.KeyValueHolder;
+import org.junit.Test;
+import org.osgi.framework.ServiceReference;
+
+public class BlueprintAddServiceTest extends CamelBlueprintTestSupport {
+
+    private MyService myService = new MyService();
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintAddServiceTest.xml";
+    }
+
+    @Override
+    protected void addServicesOnStartup(Map<String, KeyValueHolder<Object, Dictionary>> services) {
+        services.put("myService", asService(myService, "beer", "Carlsberg"));
+    }
+
+    @Test
+    public void testAddService() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("CamelCamel");
+
+        template.sendBody("direct:start", "Camel");
+
+        assertMockEndpointsSatisfied();
+
+        ServiceReference<?> ref = getBundleContext().getServiceReference("myService");
+        assertEquals("Carlsberg", ref.getProperty("beer"));
+        Object service = getBundleContext().getService(ref);
+        assertSame(myService, service);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintBeanInjectRoute.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintBeanInjectRoute.java
new file mode 100644
index 0000000..fb0eba9
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintBeanInjectRoute.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.BeanInject;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+
+public class BlueprintBeanInjectRoute extends RouteBuilder {
+
+    @BeanInject("foo")
+    private FooBar greeting;
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start")
+                .process(new Processor() {
+                    @Override
+                    public void process(Exchange exchange) throws Exception {
+                        String out = greeting.hello(exchange.getIn().getBody(String.class));
+                        exchange.getIn().setBody(out);
+                    }
+                })
+                .to("mock:result");
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.java
new file mode 100644
index 0000000..47d40b4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.component.seda.SedaComponent;
+import org.junit.Test;
+
+public class BlueprintComponentPropertyPlaceholderTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.xml";
+    }
+
+    @Test
+    public void testComponentPropertyPlaceholder() throws Exception {
+        SedaComponent myseda = (SedaComponent) context.getComponent("myseda", false);
+        assertNotNull(myseda);
+        assertEquals(2, myseda.getQueueSize());
+
+        // test that the custom component works
+
+        int before = myseda.getQueueReference("myseda://foo").getQueue().size();
+        assertEquals(0, before);
+
+        template.sendBody("direct:start", "Hello World");
+
+        int after = myseda.getQueueReference("myseda://foo").getQueue().size();
+        assertEquals(1, after);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintDefaultValuesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintDefaultValuesTest.java
new file mode 100644
index 0000000..87deaab
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintDefaultValuesTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Properties;
+
+import org.junit.Test;
+
+/**
+ * A test showing that Blueprint XML property placeholders work correctly with
+ * placeholders containing colon in the key.
+ */
+public class BlueprintDefaultValuesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/default-values.xml";
+    }
+
+    @Test
+    public void testPropertyResolutionFailure() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("dot=my.value colon=my:value");
+
+        template.sendBody("direct:start", null);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Override
+    protected Properties useOverridePropertiesWithPropertiesComponent() {
+        Properties extra = new Properties();
+        extra.put("my:key", "my:value");
+        return extra;
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.java
new file mode 100644
index 0000000..a79a1e2
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.List;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.component.mock.MockComponent;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spi.ComponentResolver;
+import org.apache.camel.util.KeyValueHolder;
+import org.junit.Test;
+
+public class BlueprintMultipleServiceTest extends CamelBlueprintTestSupport {
+
+    @EndpointInject("fakeservice1:mock")
+    private MockEndpoint fakeServiceOneMock;
+
+    @EndpointInject("fakeservice2:mock")
+    private MockEndpoint fakeServiceTwoMock;
+
+    private MockComponent mockComponentOne = new MockComponent();
+    private MockComponent mockComponentTwo = new MockComponent();
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.xml";
+    }
+
+    @Override
+    @SuppressWarnings("rawtypes")
+    protected void addServicesOnStartup(List<KeyValueHolder<String, KeyValueHolder<Object, Dictionary>>> services) {
+        Dictionary<String, String> dict1 = new Hashtable<>();
+        dict1.put("component", "fakeservice1");
+
+        Dictionary<String, String> dict2 = new Hashtable<>();
+        dict2.put("component", "fakeservice2");
+
+        services.add(asKeyValueService(ComponentResolver.class.getName(), mockComponentOne, dict1));
+        services.add(asKeyValueService(ComponentResolver.class.getName(), mockComponentTwo, dict2));
+
+    }
+
+    @Override
+    protected CamelContext createCamelContext() throws Exception {
+        CamelContext context = super.createCamelContext();
+        context.addComponent("fakeservice1", mockComponentOne);
+        context.addComponent("fakeservice2", mockComponentTwo);
+
+        return context;
+    }
+
+    @Test
+    public void testMultipleService() throws Exception {
+
+        template.sendBody("direct:start", "Camel");
+
+        fakeServiceOneMock.expectedMessageCount(1);
+        fakeServiceTwoMock.expectedMessageCount(1);
+
+        assertMockEndpointsSatisfied();
+
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.java
new file mode 100644
index 0000000..e7b8ade
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class BlueprintOptionalPropertiesDslTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.xml";
+    }
+
+    @Test
+    public void testPlaceholderDslTest() throws Exception {
+        getMockEndpoint("mock:a").expectedMessageCount(1);
+        getMockEndpoint("mock:b").expectedMessageCount(0);
+
+        try {
+            template.sendBody("direct:start", "Hello World");
+            fail("Should have thrown an exception");
+        } catch (Exception e) {
+            // expected
+        }
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
new file mode 100644
index 0000000..fa11c94
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScan2Test.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class BlueprintPackageScan2Test extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/packagescan2.xml";
+    }
+
+    // here we have regular Junit @Test method
+    @Test
+    public void testRoute() throws Exception {
+        // set mock expectations
+        getMockEndpoint("mock:a").expectedMessageCount(1);
+
+        // send a message
+        template.sendBody("direct:start", "World");
+
+        // assert mocks
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanBuilderTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanBuilderTest.java
new file mode 100644
index 0000000..87ba902
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanBuilderTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class BlueprintPackageScanBuilderTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/packagescan3.xml";
+    }
+
+    // here we have regular Junit @Test method
+    @Test
+    public void testRoute() throws Exception {
+        // set mock expectations
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+
+        // send a message
+        template.sendBody("direct:start", "World");
+
+        // assert mocks
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanTest.java
new file mode 100644
index 0000000..4d9a39c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPackageScanTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class BlueprintPackageScanTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/packagescan.xml";
+    }
+
+    // here we have regular Junit @Test method
+    @Test
+    public void testRoute() throws Exception {
+        // set mock expectations
+        getMockEndpoint("mock:a").expectedMessageCount(1);
+
+        // send a message
+        template.sendBody("direct:start", "World");
+
+        // assert mocks
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.java
new file mode 100644
index 0000000..7a160e6
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class BlueprintProduceConsumeImplicitPropertyTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.xml";
+    }
+
+    @Test
+    public void testImplicit() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+
+        template.sendBody("seda:input", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java
new file mode 100644
index 0000000..dd4f869
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementImplicitTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.List;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.properties.PropertiesComponent;
+import org.junit.Test;
+
+public class BlueprintPropertiesLocationElementImplicitTest extends CamelBlueprintTestSupport {
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/properties-location-element-implicit-test.xml";
+    }
+
+    @Test
+    public void testPropertiesLocationElement() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedHeaderReceived("property-1", "property-value-1");
+        mock.expectedHeaderReceived("property-2", "property-value-2");
+        mock.expectedHeaderReceived("cm", "cm-value");
+
+        PropertiesComponent pc = (PropertiesComponent) context.getPropertiesComponent();
+        assertNotNull("Properties component not defined", pc);
+
+        List<String> locations = pc.getLocations();
+
+        assertNotNull(locations);
+        assertEquals("Properties locations", 2, locations.size());
+
+        template.sendBody("direct:start", null);
+
+        mock.assertIsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java
new file mode 100644
index 0000000..55945da
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementOptionalTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.List;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.properties.PropertiesComponent;
+import org.junit.Test;
+
+public class BlueprintPropertiesLocationElementOptionalTest extends CamelBlueprintTestSupport {
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/properties-location-element-optional-test.xml";
+    }
+
+    @Test
+    public void testPropertiesLocationElement() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedHeaderReceived("property-1", "property-value-1");
+        mock.expectedHeaderReceived("property-2", "property-value-2");
+        mock.expectedHeaderReceived("cm", "cm-value");
+
+        PropertiesComponent pc = (PropertiesComponent) context.getPropertiesComponent();
+        assertNotNull("Properties component not defined", pc);
+
+        List<String> locations = pc.getLocations();
+
+        assertNotNull(locations);
+        assertEquals("Properties locations", 3, locations.size());
+
+        template.sendBody("direct:start", null);
+
+        mock.assertIsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java
new file mode 100644
index 0000000..437aae5
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesLocationElementTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.List;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.component.properties.PropertiesComponent;
+import org.junit.Test;
+
+public class BlueprintPropertiesLocationElementTest extends CamelBlueprintTestSupport {
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/properties-location-element-test.xml";
+    }
+
+    @Test
+    public void testPropertiesLocationElement() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedHeaderReceived("property-1", "property-value-1");
+        mock.expectedHeaderReceived("property-2", "property-value-2");
+        mock.expectedHeaderReceived("cm", "cm-value");
+
+        PropertiesComponent pc = (PropertiesComponent) context.getPropertiesComponent();
+        assertNotNull("Properties component not defined", pc);
+
+        List<String> locations = pc.getLocations();
+
+        assertNotNull(locations);
+        assertEquals("Properties locations", 3, locations.size());
+
+        template.sendBody("direct:start", null);
+
+        mock.assertIsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
new file mode 100644
index 0000000..aef19d3
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertiesTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleException;
+import org.osgi.service.blueprint.container.BlueprintContainer;
+import org.osgi.service.blueprint.container.BlueprintEvent;
+
+/**
+ *
+ */
+public class BlueprintPropertiesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin.xml";
+    }
+
+    @Test
+    public void testProperties() throws Exception {
+        Bundle camelCore = getBundleBySymbolicName("org.apache.camel.camel-blueprint");
+        Bundle test = getBundleBySymbolicName(getClass().getSimpleName());
+
+        camelCore.stop();
+        test.stop();
+
+        Thread.sleep(500);
+
+        test.start();
+        try {
+            getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + getClass().getSimpleName() + ")", 500);
+            fail("Expected a timeout");
+        } catch (RuntimeException e) {
+            // Expected timeout
+        }
+
+        CamelBlueprintHelper.waitForBlueprintContainer(null, test.getBundleContext(), getClass().getSimpleName(), BlueprintEvent.CREATED,
+                new Runnable() {
+            @Override
+            public void run() {
+                try {
+                    camelCore.start();
+                } catch (BundleException e) {
+                    throw new RuntimeException(e.getMessage(), e);
+                }
+            }
+        });
+        getOsgiService(BlueprintContainer.class, "(osgi.blueprint.container.symbolicname=" + getClass().getSimpleName() + ")", 500);
+    }
+
+    private Bundle getBundleBySymbolicName(String name) {
+        for (Bundle bundle : getBundleContext().getBundles()) {
+            if (bundle.getSymbolicName().equals(name)) {
+                return bundle;
+            }
+        }
+        return null;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertyInjectRoute.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertyInjectRoute.java
new file mode 100644
index 0000000..42eb095
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintPropertyInjectRoute.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.PropertyInject;
+import org.apache.camel.builder.RouteBuilder;
+
+public class BlueprintPropertyInjectRoute extends RouteBuilder {
+
+    @PropertyInject("greeting")
+    private String greeting;
+
+    @Override
+    public void configure() throws Exception {
+        from("seda:start")
+                .transform().constant(greeting)
+                .to("{{destination}}");
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStaticMethodRoute.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStaticMethodRoute.java
new file mode 100644
index 0000000..0106ab8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStaticMethodRoute.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class BlueprintStaticMethodRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start")
+                .setProperty("foo").method(System.class, "currentTimeMillis")
+                .setProperty("bar").simple("${bean:type:java.lang.System?method=currentTimeMillis}")
+                .to("mock:result");
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
new file mode 100644
index 0000000..b8a791a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+import static org.apache.camel.util.FileUtil.normalizePath;
+
+/**
+ *
+ */
+public class BlueprintStreamCachingStrategyTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml";
+    }
+
+    @Test
+    public void testStreamCaching() {
+        assertTrue(context.getStreamCachingStrategy().isEnabled());
+        assertEquals(normalizePath("target/cachedir"), normalizePath(context.getStreamCachingStrategy().getSpoolDirectory().toString()));
+        assertEquals(Integer.valueOf(4096).intValue(), context.getStreamCachingStrategy().getBufferSize());
+        assertEquals(Long.valueOf(8192).longValue(), context.getStreamCachingStrategy().getSpoolThreshold());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CamelEndpointInjectTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CamelEndpointInjectTest.java
new file mode 100644
index 0000000..7890e0d
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CamelEndpointInjectTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class CamelEndpointInjectTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/camelEndpointInject.xml";
+    }
+
+    @Test
+    public void testEndpointInjection() throws Exception {
+        MockEndpoint mock = context.getEndpoint("mock:result", MockEndpoint.class);
+        assertNotNull(mock);
+        mock.expectedMessageCount(1);
+
+        MyProducer producer = context.getRegistry().lookupByNameAndType("myProducer", MyProducer.class);
+        producer.doSomething("Hello World");
+
+        mock.assertIsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
new file mode 100644
index 0000000..0dc9f9a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminEndpointTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-endpoint.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointWithSynchronousBlueprintCreationTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointWithSynchronousBlueprintCreationTest.java
new file mode 100644
index 0000000..57bd686
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminEndpointWithSynchronousBlueprintCreationTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminEndpointWithSynchronousBlueprintCreationTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected boolean useAsynchronousBlueprintStartup() {
+        return false;
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-endpoint.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.java
new file mode 100644
index 0000000..e28c5a1
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminExtFileTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/ConfigAdminExtFileTest.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Camel World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+
+        assertFalse("Message history should be disabled", context.isMessageHistory());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminInitialConfigurationUsingPropertiesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminInitialConfigurationUsingPropertiesTest.java
new file mode 100644
index 0000000..2a8b58c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminInitialConfigurationUsingPropertiesTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Properties;
+
+import org.junit.Test;
+
+/**
+ * A test showing that if Blueprint XML contains property placeholders, some property source has to be defined.
+ */
+public class ConfigAdminInitialConfigurationUsingPropertiesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-endpoint-no-defaults.xml";
+    }
+
+    @Override
+    protected String setConfigAdminInitialConfiguration(Properties props) {
+        props.put("greeting", "Bye");
+        props.put("destination", "mock:result");
+        return "my-placeholders";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+        template.sendBody("direct:start", "World");
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileAndOverrideTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileAndOverrideTest.java
new file mode 100644
index 0000000..56b445b
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileAndOverrideTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+// START SNIPPET: e1
+/**
+ * This example will load a Blueprint .cfg file (which will initialize configadmin), and also override its property
+ * placeholders from this unit test source code directly (the change will reload blueprint container).
+ */
+public class ConfigAdminLoadConfigurationFileAndOverrideTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        // which blueprint XML file to use for this test
+        return "org/apache/camel/test/blueprint/configadmin-loadfileoverride.xml";
+    }
+
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // which .cfg file to use, and the name of the persistence-id
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) throws Exception {
+        // override / add extra properties
+        props.put("destination", "mock:extra");
+
+        // return the persistence-id to use
+        return "stuff";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        // mock:original comes from <cm:default-properties>/<cm:property name="destination" value="mock:original" />
+        getMockEndpoint("mock:original").setExpectedMessageCount(0);
+        // mock:result comes from loadConfigAdminConfigurationFile()
+        getMockEndpoint("mock:result").setExpectedMessageCount(0);
+        // mock:extra comes from useOverridePropertiesWithConfigAdmin()
+        getMockEndpoint("mock:extra").expectedBodiesReceived("Bye World", "Yay Bye WorldYay Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
+// END SNIPPET: e1
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileNotFoundTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileNotFoundTest.java
new file mode 100644
index 0000000..091ef01
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileNotFoundTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminLoadConfigurationFileNotFoundTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-loadfile.xml";
+    }
+
+    @Override
+    @Before
+    public void setUp() throws Exception {
+        try {
+            super.setUp();
+            fail("Should throw IllegalArgumentException, because the config file wasn't found");
+        } catch (IllegalArgumentException e) {
+            assertTrue(e.getMessage().contains("../../src/test/resources/etc/stuff.cfg"));
+        }
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
+        //  this file should exist
+        // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
+        return new String[]{"../../src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void test() throws Exception {
+        // irrelevant
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileTest.java
new file mode 100644
index 0000000..726de74
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadConfigurationFileTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ * Same as {@link ConfigAdminNoReloadLoadConfigurationFileTest} except this time Blueprint container will reloaded
+ */
+public class ConfigAdminLoadConfigurationFileTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-loadfile.xml";
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
+        // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideAltTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideAltTest.java
new file mode 100644
index 0000000..b3fdae4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideAltTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+/**
+ * This test should be run in tandem with ConfigAdminLoadConfigurationFileAndOverrideTest.  These examples will load a
+ * Blueprint .cfg file with multiple property placeholders defined.   We need two tests to make sure we
+ * process both of them correctly
+ */
+public class ConfigAdminLoadMultiConfigurationFileAndOverrideAltTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        // which blueprint XML file to use for this test
+        return "org/apache/camel/test/blueprint/configadmin-loadmultifileoverride.xml";
+    }
+
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // which .cfg files to use, and their corresponding persistence-ids
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff", "src/test/resources/etc/otherstuff.cfg", "otherstuff"};
+    }
+
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) throws Exception {
+        // override / add extra properties
+        props.put("destination", "mock:extra");
+
+        // return the persistence-id to use
+        return "stuff";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        // mock:original comes from <cm:default-properties>/<cm:property name="destination" value="mock:original" />
+        getMockEndpoint("mock:original").setExpectedMessageCount(0);
+        // mock:result comes from loadConfigAdminConfigurationFile()
+        getMockEndpoint("mock:result").setExpectedMessageCount(0);
+        // mock:extra comes from useOverridePropertiesWithConfigAdmin()
+        getMockEndpoint("mock:extra").expectedBodiesReceived("Bye World", "Yay Bye WorldYay Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideTest.java
new file mode 100644
index 0000000..8b9c2b3
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminLoadMultiConfigurationFileAndOverrideTest.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+/**
+ * This is the first of two tests which will load a Blueprint .cfg file (which will initialize configadmin), containing
+ * multiple property placeholders and also override its property placeholders directly (the change will reload blueprint
+ * container).
+ */
+public class ConfigAdminLoadMultiConfigurationFileAndOverrideTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        // which blueprint XML file to use for this test
+        return "org/apache/camel/test/blueprint/configadmin-loadmultifileoverride.xml";
+    }
+
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // which .cfg files to use, and their corresponding persistence-ids
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff", "src/test/resources/etc/otherstuff.cfg", "otherstuff"};
+    }
+
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary properties) throws Exception {
+        // override / add extra properties
+        properties.put("arrive", "mock:otherExtra");
+
+        // return the persistence-id to use
+        return "otherstuff";
+    }
+
+    @Test
+    public void testConfigAdminWithMultiplePids() throws Exception {
+        // mock:otherOriginal comes from <cm:default-properties>/<cm:property name="arrive" value="mock:otherOriginal" />
+        getMockEndpoint("mock:otherOriginal").setExpectedMessageCount(0);
+        // mock:result comes from loadConfigAdminConfigurationFile()
+        getMockEndpoint("mock:otherResult").setExpectedMessageCount(0);
+        // mock:extra comes from useOverridePropertiesWithConfigAdmin()
+        getMockEndpoint("mock:otherExtra").expectedBodiesReceived("Adieu World", "tiens! Adieu Worldtiens! Adieu World");
+
+        template.sendBody("direct:otherStart", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoDefaultValuesBlueprintCreationTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoDefaultValuesBlueprintCreationTest.java
new file mode 100644
index 0000000..8dbe971
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoDefaultValuesBlueprintCreationTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Before;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+
+/**
+ * A test showing that if Blueprint XML contains property placeholders, some property source has to be defined.
+ */
+public class ConfigAdminNoDefaultValuesBlueprintCreationTest extends CamelBlueprintTestSupport {
+
+    @Override
+    @Before
+    public void setUp() throws Exception {
+        try {
+            super.setUp();
+            fail("Should fail, because Blueprint XML uses property placeholders, but we didn't define any property sources");
+        } catch (Exception e) {
+            assertThat(e.getCause().getCause().getMessage(), equalTo("Property with key [destination] not found in properties from text: {{destination}}"));
+        }
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-endpoint-no-defaults.xml";
+    }
+
+    @Test
+    public void test() throws Exception {
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadDefaultPropertiesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadDefaultPropertiesTest.java
new file mode 100644
index 0000000..042163f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadDefaultPropertiesTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminNoReloadDefaultPropertiesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-no-reload-default-properties.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Good morning World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileAndOverrideTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileAndOverrideTest.java
new file mode 100644
index 0000000..f44479e
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileAndOverrideTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+// START SNIPPET: e1
+/**
+ * This example will load a Blueprint .cfg file (which will initialize configadmin), and also override its property
+ * placeholders from this unit test source code directly (the change won't reload blueprint container).
+ */
+public class ConfigAdminNoReloadLoadConfigurationFileAndOverrideTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        // which blueprint XML file to use for this test
+        return "org/apache/camel/test/blueprint/configadmin-no-reload-loadfileoverride.xml";
+    }
+
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // which .cfg file to use, and the name of the persistence-id
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) throws Exception {
+        // override / add extra properties
+        props.put("destination", "mock:extra");
+
+        // return the persistence-id to use
+        return "stuff";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        // mock:original comes from <cm:default-properties>/<cm:property name="destination" value="mock:original" />
+        getMockEndpoint("mock:original").setExpectedMessageCount(0);
+        // mock:result comes from loadConfigAdminConfigurationFile()
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World", "Yay Bye WorldYay Bye World");
+        // mock:extra comes from useOverridePropertiesWithConfigAdmin(), but BP container isn't reloaded
+        getMockEndpoint("mock:extra").setExpectedMessageCount(0);
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
+// END SNIPPET: e1
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileDefaultPropertiesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileDefaultPropertiesTest.java
new file mode 100644
index 0000000..eb9e351
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileDefaultPropertiesTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ * {@link #loadConfigAdminConfigurationFile()} will override properties set by <code>&lt;cm:default-properties&gt;</code>
+ */
+public class ConfigAdminNoReloadLoadConfigurationFileDefaultPropertiesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-no-reload-loadfile-default-properties.xml";
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
+        // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileTest.java
new file mode 100644
index 0000000..030e444
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadLoadConfigurationFileTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminNoReloadLoadConfigurationFileTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-no-reload-loadfile.xml";
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String[] loadConfigAdminConfigurationFile() {
+        // String[0] = tell Camel the path of the .cfg file to use for OSGi ConfigAdmin in the blueprint XML file
+        // String[1] = tell Camel the persistence-id of the cm:property-placeholder in the blueprint XML file
+        return new String[]{"src/test/resources/etc/stuff.cfg", "stuff"};
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadOverridePropertiesOutsideCamelContextTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadOverridePropertiesOutsideCamelContextTest.java
new file mode 100644
index 0000000..e816989
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminNoReloadOverridePropertiesOutsideCamelContextTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminNoReloadOverridePropertiesOutsideCamelContextTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-no-reload-outside.xml";
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
+        // add the properties we want to override
+        props.put("greeting", "Bye");
+        props.put("destination", "mock:extra");
+
+        // return the PID of the config-admin we are using in the blueprint xml file
+        return "my-placeholders";
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        // Even if we update config admin configuration, update-strategy="none" won't cause reload of BP
+        // container and reinjection of bean properties
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:extra").setExpectedMessageCount(0);
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesOutsideCamelContextTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesOutsideCamelContextTest.java
new file mode 100644
index 0000000..acd82f1
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesOutsideCamelContextTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Dictionary;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminOverridePropertiesOutsideCamelContextTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin-outside.xml";
+    }
+
+    // START SNIPPET: e1
+    @Override
+    protected String useOverridePropertiesWithConfigAdmin(Dictionary props) {
+        // add the properties we want to override
+        props.put("greeting", "Bye");
+
+        // return the PID of the config-admin we are using in the blueprint xml file
+        return "my-placeholders";
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesTest.java
new file mode 100644
index 0000000..5a83066
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminOverridePropertiesTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Properties;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminOverridePropertiesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin.xml";
+    }
+
+    // START SNIPPET: e1
+    // override this method to provide our custom properties we use in this unit test
+    @Override
+    protected Properties useOverridePropertiesWithPropertiesComponent() {
+        Properties extra = new Properties();
+        extra.put("destination", "mock:extra");
+        extra.put("greeting", "Bye");
+        return extra;
+    }
+    // END SNIPPET: e1
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:extra").expectedBodiesReceived("Bye World");
+        getMockEndpoint("mock:result").expectedMessageCount(0);
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
new file mode 100644
index 0000000..ce14fd4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ConfigAdminTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class ConfigAdminTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/configadmin.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java
new file mode 100644
index 0000000..c68a6da
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ContextCreationTimeoutTest.java
@@ -0,0 +1,142 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ContextCreationTimeoutTest extends Assert {
+    
+    @After
+    public void cleanup() {
+        System.clearProperty(CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT);
+    }
+
+    @Test
+    public void testDefault() {
+        System.clearProperty(CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT);
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        assertNull(ts.getCamelContextCreationTimeout());
+    }
+
+    @Test
+    public void testSystemPropertyNormal() {
+        final Long someValue = 60000L;
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                someValue.toString());
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        assertEquals(someValue, ts.getCamelContextCreationTimeout());
+    }
+    
+    @Test
+    public void testSystemPropertyMaxVal() {
+        final Long someValue = Long.MAX_VALUE;
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                someValue.toString());
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        assertEquals(someValue, ts.getCamelContextCreationTimeout());
+    }
+    
+    @Test
+    public void testSystemPropertyZero() {
+        final Long zeroValue = 0L;
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                zeroValue.toString());
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        assertEquals(zeroValue, ts.getCamelContextCreationTimeout());
+    }
+
+    @Test
+    public void testSystemPropertyNegative() {
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                "-100");
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        try {
+            ts.getCamelContextCreationTimeout();
+            fail();
+        } catch (IllegalArgumentException e) {
+            assertNull(e.getCause());
+        }
+    }
+
+    @Test
+    public void testSystemPropertyWrongFormat() {
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                "NaN");
+        CamelBlueprintTestSupport ts = new DefaultTestSupport();
+        try {
+            ts.getCamelContextCreationTimeout();
+            fail();
+        } catch (IllegalArgumentException e) {
+            assertTrue(e.getCause() instanceof NumberFormatException);
+        }
+    }
+    
+    @Test
+    public void testOverrideNormal() {
+        final Long someValue = 60000L;
+        System.clearProperty(CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT);
+        CamelBlueprintTestSupport ts = new OverridingTestSupport(someValue);
+        assertEquals(someValue, ts.getCamelContextCreationTimeout());
+    }
+    
+    @Test
+    public void testOverrideSystemPropNormal() {
+        final Long someValue = 60000L;
+        final Long syspropValue = someValue + 60000L;
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                syspropValue.toString());
+        CamelBlueprintTestSupport ts = new OverridingTestSupport(someValue);
+        assertEquals(someValue, ts.getCamelContextCreationTimeout());
+    }
+    
+    @Test
+    public void testOverrideSystemPropNegative() {
+        final Long someValue = 60000L;
+        final Long syspropValue = (Math.abs(someValue) + 10) * -1;
+        System.setProperty(
+                CamelBlueprintTestSupport.SPROP_CAMEL_CONTEXT_CREATION_TIMEOUT,
+                syspropValue.toString());
+        CamelBlueprintTestSupport ts = new OverridingTestSupport(someValue);
+        assertEquals(someValue, ts.getCamelContextCreationTimeout());
+    }
+    
+    private static class DefaultTestSupport extends CamelBlueprintTestSupport {
+
+    }
+
+    private static class OverridingTestSupport extends CamelBlueprintTestSupport {
+
+        private final Long timeout;
+
+        OverridingTestSupport(Long timeout) {
+            this.timeout = timeout;
+        }
+
+        @Override
+        protected Long getCamelContextCreationTimeout() {
+            return timeout;
+        }
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CustomIdIssuesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CustomIdIssuesTest.java
new file mode 100644
index 0000000..84ffaed
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/CustomIdIssuesTest.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.model.ChoiceDefinition;
+import org.apache.camel.model.FromDefinition;
+import org.apache.camel.model.LogDefinition;
+import org.apache.camel.model.RouteDefinition;
+import org.apache.camel.model.WhenDefinition;
+import org.junit.Test;
+
+public class CustomIdIssuesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/CustomIdIssuesTest.xml";
+    }
+
+    @Test
+    public void testCustomId() {
+        RouteDefinition route = context.getRouteDefinition("myRoute");
+        assertNotNull(route);
+        assertTrue(route.hasCustomIdAssigned());
+
+        FromDefinition from = route.getInput();
+        assertEquals("fromFile", from.getId());
+        assertTrue(from.hasCustomIdAssigned());
+
+        ChoiceDefinition choice = (ChoiceDefinition) route.getOutputs().get(0);
+        assertEquals("myChoice", choice.getId());
+        assertTrue(choice.hasCustomIdAssigned());
+
+        WhenDefinition when = choice.getWhenClauses().get(0);
+        assertTrue(when.hasCustomIdAssigned());
+        assertEquals("UK", when.getId());
+
+        LogDefinition log = (LogDefinition) choice.getOtherwise().getOutputs().get(0);
+        assertFalse(log.hasCustomIdAssigned());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.java
new file mode 100644
index 0000000..e1d16a4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class DeadLetterChannelLogExhaustedMessageHistoryTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.xml";
+    }
+
+    @Test
+    public void testLogExhaustedMessageHistory() throws Exception {
+        template.sendBody("direct:start", "Hello World");
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.java
new file mode 100644
index 0000000..6e86a20
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.junit.Test;
+
+public class DeadLetterChannelOnPrepareTestTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.xml";
+    }
+
+    @Test
+    public void testDeadLetterChannelOnPrepare() throws Exception {
+        getMockEndpoint("mock:dead").expectedBodiesReceived("Hello World");
+        getMockEndpoint("mock:dead").expectedHeaderReceived("FailedBecause", "Forced");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    public static class MyPrepareProcessor implements Processor {
+
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
+            exchange.getIn().setHeader("FailedBecause", cause.getMessage());
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java
new file mode 100644
index 0000000..ade5182
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DebugBlueprintTest.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.model.ProcessorDefinition;
+import org.junit.Test;
+
+// START SNIPPET: example
+// tag::example[]
+// to use camel-test-blueprint, then extend the CamelBlueprintTestSupport class,
+// and add your unit tests methods as shown below.
+public class DebugBlueprintTest extends CamelBlueprintTestSupport {
+
+    private boolean debugBeforeMethodCalled;
+    private boolean debugAfterMethodCalled;
+
+    // override this method, and return the location of our Blueprint XML file to be used for testing
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/camelContext.xml";
+    }
+
+    // here we have regular JUnit @Test method
+    @Test
+    public void testRoute() throws Exception {
+
+        // set mock expectations
+        getMockEndpoint("mock:a").expectedMessageCount(1);
+
+        // send a message
+        template.sendBody("direct:start", "World");
+
+        // assert mocks
+        assertMockEndpointsSatisfied();
+
+        // assert on the debugBefore/debugAfter methods below being called as we've enabled the debugger
+        assertTrue(debugBeforeMethodCalled);
+        assertTrue(debugAfterMethodCalled);
+    }
+
+    @Override
+    public boolean isUseDebugger() {
+        // must enable debugger
+        return true;
+    }
+
+    @Override
+    protected void debugBefore(Exchange exchange, org.apache.camel.Processor processor, ProcessorDefinition<?> definition, String id, String label) {
+        log.info("Before " + definition + " with body " + exchange.getIn().getBody());
+        debugBeforeMethodCalled = true;
+    }
+
+    @Override
+    protected void debugAfter(Exchange exchange, org.apache.camel.Processor processor, ProcessorDefinition<?> definition, String id, String label, long timeTaken) {
+        log.info("After " + definition + " with body " + exchange.getIn().getBody());
+        debugAfterMethodCalled = true;
+    }
+}
+// end::example[]
+// END SNIPPET: example
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.java
new file mode 100644
index 0000000..fd1c6c4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class DefaultErrorHandlerLogExhaustedMessageHistoryTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.xml";
+    }
+
+    @Test
+    public void testLogExhaustedMessageHistory() throws Exception {
+        try {
+            template.sendBody("direct:start", "Hello World");
+            fail("Should fail");
+        } catch (Exception e) {
+            // ignore
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.java
new file mode 100644
index 0000000..a1020d2
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.junit.Test;
+
+public class DefaultErrorHandlerOnPrepareTestTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.xml";
+    }
+
+    @Test
+    public void testDefaultErrorHandlerOnPrepare() throws Exception {
+        Exchange out = template.request("direct:start", new Processor() {
+            @Override
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setBody("Hello World");
+            }
+        });
+        assertNotNull(out);
+        assertTrue("Should be failed", out.isFailed());
+        assertIsInstanceOf(IllegalArgumentException.class, out.getException());
+        assertEquals("Forced", out.getIn().getHeader("FailedBecause"));
+    }
+
+    public static class MyPrepareProcessor implements Processor {
+
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class);
+            exchange.getIn().setHeader("FailedBecause", cause.getMessage());
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EndpointPropertyTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EndpointPropertyTest.java
new file mode 100644
index 0000000..d527b83
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EndpointPropertyTest.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.blueprint.BlueprintCamelContext;
+import org.apache.camel.component.seda.SedaEndpoint;
+import org.junit.Test;
+
+public class EndpointPropertyTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/EndpointPropertyTest.xml";
+    }
+
+    @Test
+    public void testEndpointProperty() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(2);
+        template.sendBody("ref:foo", "Hello World");
+        template.sendBody("ref:bar", "Bye World");
+        assertMockEndpointsSatisfied();
+
+        BlueprintCamelContext blue = context().adapt(BlueprintCamelContext.class);
+
+        SedaEndpoint foo = (SedaEndpoint) blue.getBlueprintContainer().getComponentInstance("foo");
+        assertNotNull(foo);
+        assertEquals(100, foo.getSize());
+        assertEquals(5000, foo.getPollTimeout());
+        assertEquals(true, foo.isBlockWhenFull());
+        assertEquals("seda://foo?blockWhenFull=true&pollTimeout=5000&size=100", foo.getEndpointUri());
+
+        SedaEndpoint bar = (SedaEndpoint) blue.getBlueprintContainer().getComponentInstance("bar");
+        assertNotNull(bar);
+        assertEquals(200, bar.getSize());
+        assertEquals("seda://bar?size=200", bar.getEndpointUri());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EventNotifierTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EventNotifierTest.java
new file mode 100644
index 0000000..80c9573
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/EventNotifierTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ * Tests using custom event notifier
+ */
+public class EventNotifierTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/eventNotifier.xml";
+    }
+
+    @Test
+    public void testCustomEvent() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        getMockEndpoint("mock:event").expectedMinimumMessageCount(8);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FilterTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FilterTest.java
new file mode 100644
index 0000000..d0c4024
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FilterTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+/**
+ * Tests filtering using Camel Blueprint Test
+ *
+ */
+// START SNIPPET: example
+public class FilterTest extends CamelBlueprintTestSupport {
+
+    @EndpointInject("mock:result")
+    protected MockEndpoint resultEndpoint;
+
+    @Produce("direct:start")
+    protected ProducerTemplate template;
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/filterTest.xml";
+    }
+
+    @Test
+    public void testSendMatchingMessage() throws Exception {
+        String expectedBody = "<matched/>";
+
+        resultEndpoint.expectedBodiesReceived(expectedBody);
+
+        template.sendBodyAndHeader(expectedBody, "foo", "bar");
+
+        resultEndpoint.assertIsSatisfied();
+    }
+
+    @Test
+    public void testSendNotMatchingMessage() throws Exception {
+        resultEndpoint.expectedMessageCount(0);
+
+        template.sendBodyAndHeader("<notMatched/>", "foo", "notMatchedHeaderValue");
+
+        resultEndpoint.assertIsSatisfied();
+    }
+}
+// END SNIPPET: example
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/Foo.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/Foo.java
new file mode 100644
index 0000000..54b86ab
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/Foo.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+public class Foo {
+
+    private String first;
+    private String last;
+
+    public String getFirst() {
+        return first;
+    }
+
+    public void setFirst(String first) {
+        this.first = first;
+    }
+
+    public String getLast() {
+        return last;
+    }
+
+    public void setLast(String last) {
+        this.last = last;
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooBar.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooBar.java
new file mode 100644
index 0000000..810243d
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooBar.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+public class FooBar {
+
+    private String greeting = "Hello";
+
+    public String hello(String name) {
+        return greeting + " " + name;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooService.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooService.java
new file mode 100644
index 0000000..381ba4c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/FooService.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Consume;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+
+/**
+ *
+ */
+public class FooService {
+    private String fooEndpoint;
+    private String barEndpoint;
+    @Produce
+    private ProducerTemplate bar;
+
+    public String getFooEndpoint() {
+        return fooEndpoint;
+    }
+
+    public void setFooEndpoint(String fooEndpoint) {
+        this.fooEndpoint = fooEndpoint;
+    }
+
+    public String getBarEndpoint() {
+        return barEndpoint;
+    }
+
+    public void setBarEndpoint(String barEndpoint) {
+        this.barEndpoint = barEndpoint;
+    }
+
+    @Consume
+    public void onFoo(String input) {
+        bar.sendBody(input);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IEcho.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IEcho.java
new file mode 100644
index 0000000..79a869c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IEcho.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+public interface IEcho {
+
+    String echo(String hello);
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IgnoreDatatypesTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IgnoreDatatypesTest.java
new file mode 100644
index 0000000..1f402bc
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IgnoreDatatypesTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+/**
+ *
+ */
+public class IgnoreDatatypesTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/ignoreDatatypes.xml";
+    }
+
+    @Override
+    protected String getBundleDirectives() {
+        return "blueprint.aries.xml-validation:=false";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/InflightRepositoryRefTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/InflightRepositoryRefTest.java
new file mode 100644
index 0000000..9defaeb
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/InflightRepositoryRefTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class InflightRepositoryRefTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/inflightRepositoryRefTest.xml";
+    }
+    
+    @Test
+    public void testEndpointConfiguration() throws Exception {
+        assertTrue("Get a wrong inflight repository", context.getInflightRepository() instanceof MyInflightRepository);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java
new file mode 100644
index 0000000..45ce98e
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/IsMockEndpointJUnit4Test.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+public class IsMockEndpointJUnit4Test extends CamelBlueprintTestSupport {
+   
+    @EndpointInject (value = "mock:seda:result")
+    private MockEndpoint mockSeda;
+
+    @EndpointInject (value = "mock:bar")
+    private MockEndpoint mockBar;
+
+    @EndpointInject (value = "mock:baz")
+    private MockEndpoint mockBaz;
+    
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/IsMockEndpoints.xml";
+    }
+
+    @Override
+    public String isMockEndpoints() {
+        return "*";
+    }
+
+
+    @Test
+    public void testMockAllEndpoints() throws Exception {
+        mockSeda.expectedBodiesReceived("bar");
+        mockBar.expectedBodiesReceived("bar");
+
+        template.sendBody("direct:foo", "Hello World");
+
+        assertNotNull(context.hasEndpoint("mock:seda:result"));
+        assertNotNull(context.hasEndpoint("mock:baz"));
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testMockBar() throws Exception {
+        mockBar.expectedBodiesReceived("bar");
+
+        template.sendBody("direct:foo", "Hello World");
+
+        assertNotNull(context.hasEndpoint("mock:bar"));
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testMockBaz() throws Exception {
+        mockBaz.expectedBodiesReceived("baz");
+
+        template.sendBody("direct:foo", "Hello World");
+
+        assertNotNull(context.hasEndpoint("mock:baz"));
+        assertMockEndpointsSatisfied();
+    }
+}
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/LoadPropertiesFromBeansTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/LoadPropertiesFromBeansTest.java
new file mode 100644
index 0000000..aefb04a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/LoadPropertiesFromBeansTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class LoadPropertiesFromBeansTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/loadPropertiesFromBeans.xml";
+    }
+
+    @Test
+    public void testConfigAdmin() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java
new file mode 100644
index 0000000..a27cc22
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoPidTest.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.ProducerTemplate;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class MainNoPidTest {
+
+    @Test
+    public void testMyMain() throws Exception {
+        Main main = new Main();
+        main.setBundleName("MyMainBundle");
+        // as we run this test without packing ourselves as bundle, then include ourselves
+        main.setIncludeSelfAsBundle(true);
+        // setup the blueprint file here
+        main.setDescriptors("org/apache/camel/test/blueprint/main-no-pid-loadfile.xml");
+        main.start();
+
+        ProducerTemplate template = main.getCamelTemplate();
+        assertNotNull("We should get the template here", template);
+
+        String result = template.requestBody("direct:start", "hello", String.class);
+        assertEquals("Get a wrong response", "Good morning hello", result);
+        main.stop();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java
new file mode 100644
index 0000000..3a37388
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainNoReloadTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.ProducerTemplate;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class MainNoReloadTest {
+
+    @Test
+    public void testMyMain() throws Exception {
+        Main main = new Main();
+        main.setBundleName("MyMainBundle");
+        // as we run this test without packing ourselves as bundle, then include ourselves
+        main.setIncludeSelfAsBundle(true);
+        // setup the blueprint file here
+        main.setDescriptors("org/apache/camel/test/blueprint/main-no-reload-loadfile.xml");
+        // set the configAdmin persistent id
+        main.setConfigAdminPid("stuff");
+        // set the configAdmin persistent file name
+        main.setConfigAdminFileName("src/test/resources/etc/stuff.cfg");
+        main.start();
+
+        ProducerTemplate template = main.getCamelTemplate();
+        assertNotNull("We should get the template here", template);
+
+        String result = template.requestBody("direct:start", "hello", String.class);
+        assertEquals("Get a wrong response", "Bye hello", result);
+        main.stop();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java
new file mode 100644
index 0000000..dd0dd24
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MainTest.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import org.apache.aries.util.io.IOUtils;
+import org.apache.camel.ProducerTemplate;
+import org.junit.Test;
+import org.ops4j.pax.swissbox.tinybundles.core.TinyBundle;
+import org.ops4j.pax.swissbox.tinybundles.core.TinyBundles;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class MainTest {
+
+    private static final String SYMBOLIC_NAME = "testMainWithoutIncludingTestBundle";
+
+    @Test
+    public void testMyMain() throws Exception {
+        Main main = new Main();
+        main.setBundleName("MyMainBundle");
+        // as we run this test without packing ourselves as bundle, then include ourselves
+        main.setIncludeSelfAsBundle(true);
+        // setup the blueprint file here
+        main.setDescriptors("org/apache/camel/test/blueprint/main-loadfile.xml");
+        // set the configAdmin persistent id
+        main.setConfigAdminPid("stuff");
+        // set the configAdmin persistent file name
+        main.setConfigAdminFileName("src/test/resources/etc/stuff.cfg");
+        main.start();
+        
+        ProducerTemplate template = main.getCamelTemplate();
+        assertNotNull("We should get the template here", template);
+        
+        String result = template.requestBody("direct:start", "hello", String.class);
+        assertEquals("Get a wrong response", "Bye hello", result);
+        main.stop();
+    }
+
+    @Test
+    public void testMainWithoutIncludingTestBundle() throws Exception {
+        TinyBundle bundle = TinyBundles.newBundle();
+        bundle.add("OSGI-INF/blueprint/camel.xml", getClass().getResourceAsStream("main-loadfile.xml"));
+        bundle.set("Manifest-Version", "2")
+                .set("Bundle-ManifestVersion", "2")
+                .set("Bundle-SymbolicName", SYMBOLIC_NAME)
+                .set("Bundle-Version", "1.0.0");
+        File tb = File.createTempFile(SYMBOLIC_NAME + "-", ".jar", new File("target"));
+        FileOutputStream out = new FileOutputStream(tb);
+        IOUtils.copy(bundle.build(), out);
+        out.close();
+
+        // simulate `camel:run` which is run after packaging the artifact, so a "bundle" (location with
+        // META-INF/MANIFEST.MF) is detected in target/classes
+        URLClassLoader loader = new URLClassLoader(new URL[] {tb.toURI().toURL()}, getClass().getClassLoader());
+
+        Main main = new Main();
+        main.setLoader(loader);
+        // bundle name will be used as filter for blueprint container filter
+        main.setBundleName(SYMBOLIC_NAME);
+        // don't include test bundle (which is what `mvn camel:run` actually does)
+        main.setIncludeSelfAsBundle(false);
+        // don't setup the blueprint file here - it'll be picked up from a bundle on classpath
+        //main.setDescriptors("none!");
+        // set the configAdmin persistent id
+        main.setConfigAdminPid("stuff");
+        // set the configAdmin persistent file name
+        main.setConfigAdminFileName("src/test/resources/etc/stuff.cfg");
+        main.doStart();
+
+        ProducerTemplate template = main.getCamelTemplate();
+        assertNotNull("We should get the template here", template);
+
+        String result = template.requestBody("direct:start", "hello", String.class);
+        assertEquals("Get a wrong response", "Bye hello", result);
+        main.stop();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.java
new file mode 100644
index 0000000..8db7248
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class MockEndpointsAndSkipTest extends CamelBlueprintTestSupport {
+
+    @Override
+    public String isMockEndpointsAndSkip() {
+        return "seda*";
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.xml";
+    }
+
+    @Test
+    public void testHelloWorld() throws Exception {
+        getMockEndpoint("mock:seda:foo").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyCoolBean.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyCoolBean.java
new file mode 100644
index 0000000..6a174d5
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyCoolBean.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+/**
+ *
+ */
+public class MyCoolBean {
+
+    private String say;
+    private String echo;
+
+    public String getSay() {
+        return say;
+    }
+
+    public void setSay(String say) {
+        this.say = say;
+    }
+
+    public String getEcho() {
+        return echo;
+    }
+
+    public void setEcho(String echo) {
+        this.echo = echo;
+    }
+
+    public String saySomething(String s) {
+        return say + " " + s;
+    }
+
+    public String echoSomething(String s) {
+        return echo + " " + s + echo + " " + s;
+    }
+
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyInflightRepository.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyInflightRepository.java
new file mode 100644
index 0000000..d466af5
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyInflightRepository.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.impl.engine.DefaultInflightRepository;
+
+public class MyInflightRepository extends DefaultInflightRepository {
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java
new file mode 100644
index 0000000..b4a8696
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyMainAppTest.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.CamelContext;
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+
+public class MyMainAppTest {
+
+    public static void main(String[] args) throws Exception {
+        MyMainAppTest me = new MyMainAppTest();
+        me.testMyMain();
+    }
+
+    @Test
+    public void testMyMain() throws Exception {
+        Main main = new Main();
+        run(main);
+        
+        CamelContext camelContext = main.getCamelContext();
+        assertNotNull(camelContext);
+    }
+
+    public void run(Main main) throws Exception {
+        main.setBundleName("MyMainBundle");
+        // as we run this test without packing ourselves as bundle, then include ourselves
+        main.setIncludeSelfAsBundle(true);
+        // we support *.xml to find any blueprint xml files
+        main.setDescriptors("org/apache/camel/test/blueprint/xpath/*.xml");
+
+        // run for 1 second and then stop automatic
+        main.setDuration(1);
+        main.run();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProducer.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProducer.java
new file mode 100644
index 0000000..3f8fa4f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProducer.java
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.ProducerTemplate;
+
+/**
+ *
+ */
+public class MyProducer {
+
+    @EndpointInject("ref:testEndpoint")
+    private ProducerTemplate endpoint;
+
+    public void doSomething(String body) {
+        endpoint.sendBody(body);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProperties.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProperties.java
new file mode 100644
index 0000000..3bcd16c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyProperties.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import java.util.Properties;
+
+public class MyProperties extends Properties {
+    
+    private static final long serialVersionUID = -2082205766653164835L;
+
+    public MyProperties() {
+        setProperty("greeting", "Hello");
+        setProperty("hello", "Hello Camel");
+        setProperty("destination", "mock:result");
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyService.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyService.java
new file mode 100644
index 0000000..2bd1b43
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyService.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+public class MyService {
+
+    public String echo(String hello) {
+        return hello + hello;
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyShutdownStrategy.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyShutdownStrategy.java
new file mode 100644
index 0000000..6573406
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/MyShutdownStrategy.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.impl.engine.DefaultShutdownStrategy;
+
+public class MyShutdownStrategy extends DefaultShutdownStrategy {
+
+    @Override
+    public void setTimeout(long timeout) {
+        // only accept if its 5, as camel-test-blueprint sets a default timeout to 10 sec
+        // and we want to unit test that we can change that to 5 seconds
+        if (timeout == 5) {
+            super.setTimeout(timeout);
+        }
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.java
new file mode 100644
index 0000000..f32f61f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.junit.Test;
+
+public class OnExceptionOccurredProcessorOnExceptionTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.xml";
+    }
+
+    @Test
+    public void testOnExceptionOccurred() throws Exception {
+        getMockEndpoint("mock:dead").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+
+        MyProcessor myProcessor = context.getRegistry().lookupByNameAndType("myProcessor", MyProcessor.class);
+        // 1 = first time + 3 redelivery attempts
+        assertEquals(1 + 3, myProcessor.getInvoked());
+    }
+
+    public static class MyProcessor implements Processor {
+
+        private int invoked;
+
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            invoked++;
+        }
+
+        public int getInvoked() {
+            return invoked;
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.java
new file mode 100644
index 0000000..dcc6653
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.junit.Test;
+
+public class OnExceptionOccurredProcessorTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.xml";
+    }
+
+    @Test
+    public void testOnExceptionOccurred() throws Exception {
+        getMockEndpoint("mock:dead").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+
+        MyProcessor myProcessor = context.getRegistry().lookupByNameAndType("myProcessor", MyProcessor.class);
+        // 1 = first time + 3 redelivery attempts
+        assertEquals(1 + 3, myProcessor.getInvoked());
+    }
+
+    public static class MyProcessor implements Processor {
+
+        private int invoked;
+
+        @Override
+        public void process(Exchange exchange) throws Exception {
+            invoked++;
+        }
+
+        public int getInvoked() {
+            return invoked;
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdRouteBuilder.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdRouteBuilder.java
new file mode 100644
index 0000000..77318a0
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdRouteBuilder.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public class OnExceptionRouteIdRouteBuilder extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        onException(Exception.class).id("myError")
+                .maximumRedeliveries(0)
+                .handled(true)
+                .setHeader("error", constant("true"))
+                .end()
+                .stop();
+
+        from("direct:foo").routeId("foo")
+                .to("mock:foo")
+                .end();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.java
new file mode 100644
index 0000000..e70637b
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.model.RouteDefinition;
+import org.junit.Test;
+
+public class OnExceptionRouteIdTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/OnExceptionRouteIdTest.xml";
+    }
+
+    @Test
+    public void testOnExceptionRouteId() throws Exception {
+        getMockEndpoint("mock:error").expectedMessageCount(0);
+        getMockEndpoint("mock:foo").expectedMessageCount(1);
+
+        template.sendBody("direct:foo", "Hello World");
+
+        assertMockEndpointsSatisfied();
+
+        RouteDefinition route = context.getRouteDefinition("foo");
+        assertNotNull(route);
+        assertEquals("foo", route.getId());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.java
new file mode 100644
index 0000000..e6daebc
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.spi.PropertiesFunction;
+import org.junit.Test;
+
+public class PropertiesComponentFunctionTest extends CamelBlueprintTestSupport {
+
+    public static final class MyFunction implements PropertiesFunction {
+
+        @Override
+        public String getName() {
+            return "beer";
+        }
+
+        @Override
+        public String apply(String remainder) {
+            return "mock:" + remainder.toLowerCase();
+        }
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.xml";
+    }
+
+    @Test
+    public void testFunction() throws Exception {
+        getMockEndpoint("mock:foo").expectedMessageCount(1);
+        getMockEndpoint("mock:bar").expectedMessageCount(1);
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
+
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertyInjectTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertyInjectTest.java
new file mode 100644
index 0000000..d86d289
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/PropertyInjectTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class PropertyInjectTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/propertyInjectTest.xml";
+    }
+
+    @Test
+    public void testPropertyInject() throws Exception {
+        if (isPlatform("windows")) {
+            // need a bit slack
+            Thread.sleep(1000);
+        }
+
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello");
+
+        template.sendBody("seda:start", "Camel");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ProxyTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ProxyTest.java
new file mode 100644
index 0000000..8bc59d4
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ProxyTest.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class ProxyTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/proxy.xml";
+    }
+
+    @Test
+    public void testProxy() throws Exception {
+        IEcho my = context.getRegistry().lookupByNameAndType("myProxy", IEcho.class);
+        String out = my.echo("Camel");
+        assertEquals("Bye Camel", out);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ShutdownStrategyTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ShutdownStrategyTest.java
new file mode 100644
index 0000000..1fd14ee
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ShutdownStrategyTest.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class ShutdownStrategyTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/shutdown.xml";
+    }
+
+    @Test
+    public void testShutdown() throws Exception {
+        log.info("Using shutdown strategy {}", context.getShutdownStrategy());
+        assertIsInstanceOf(MyShutdownStrategy.class, context.getShutdownStrategy());
+
+        assertEquals(5, context.getShutdownStrategy().getTimeout());
+    }
+}
+
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleMockTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleMockTest.java
new file mode 100644
index 0000000..838aaee
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleMockTest.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class SimpleMockTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/simpleMockTest.xml";
+    }
+
+    @Test
+    public void testHelloWorld() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived("Hello World");
+
+        template.sendBody("direct:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformAnnotationsBlueprintTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformAnnotationsBlueprintTest.java
new file mode 100644
index 0000000..8d53682
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformAnnotationsBlueprintTest.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.EndpointInject;
+import org.apache.camel.Produce;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+/**
+ * Test class that demonstrates the fundamental interactions going on to verify that a route behaves as it should.
+ */
+public class SimpleTransformAnnotationsBlueprintTest extends CamelBlueprintTestSupport {
+
+    @Produce("direct:in")
+    private ProducerTemplate producerTemplate;
+
+    @EndpointInject("mock:out")
+    private MockEndpoint mockOut;
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/simpleTransform-context.xml,"
+             + "org/apache/camel/test/blueprint/simpleTransform-properties-context.xml";
+    }
+
+    @Test
+    public void testPayloadIsTransformed() throws InterruptedException {
+        mockOut.setExpectedMessageCount(1);
+        mockOut.message(0).body().isEqualTo("Modified: Cheese");
+
+        producerTemplate.sendBody("Cheese");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testPayloadIsTransformedAgain() throws InterruptedException {
+        mockOut.setExpectedMessageCount(1);
+        mockOut.message(0).body().isEqualTo("Modified: Foo");
+
+        producerTemplate.sendBody("Foo");
+
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformBlueprintTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformBlueprintTest.java
new file mode 100644
index 0000000..980c231
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleTransformBlueprintTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.junit.Test;
+
+/**
+ * Test class that demonstrates the fundamental interactions going on to verify that a route behaves as it should.
+ */
+public class SimpleTransformBlueprintTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/simpleTransform-context.xml,"
+             + "org/apache/camel/test/blueprint/simpleTransform-properties-context.xml";
+    }
+
+    @Test
+    public void testPayloadIsTransformed() throws InterruptedException {
+        MockEndpoint mockOut = getMockEndpoint("mock:out");
+        mockOut.setExpectedMessageCount(1);
+        mockOut.message(0).body().isEqualTo("Modified: Cheese");
+
+        template.sendBody("direct:in", "Cheese");
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testPayloadIsTransformedAgain() throws InterruptedException {
+        MockEndpoint mockOut = getMockEndpoint("mock:out");
+        mockOut.setExpectedMessageCount(1);
+        mockOut.message(0).body().isEqualTo("Modified: Foo");
+
+        template.sendBody("direct:in", "Foo");
+
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.java
new file mode 100644
index 0000000..d9b9679
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.builder.AdviceWithRouteBuilder;
+import org.apache.camel.reifier.RouteReifier;
+import org.junit.Test;
+
+public class SimpleWeaveAddMockLastTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.xml";
+    }
+
+    @Override
+    public boolean isUseAdviceWith() {
+        return true;
+    }
+
+    @Test
+    public void testWeaveAddMockLast() throws Exception {
+        RouteReifier.adviceWith(context.getRouteDefinitions().get(0), context, new AdviceWithRouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                weaveAddLast().to("mock:result");
+            }
+        });
+        context.start();
+
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye Camel");
+
+        template.sendBody("seda:start", "Camel");
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ThreadNamePatternTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ThreadNamePatternTest.java
new file mode 100644
index 0000000..b3a7ad2
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/ThreadNamePatternTest.java
@@ -0,0 +1,38 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.junit.Test;
+
+public class ThreadNamePatternTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/threadNamePatternTest.xml";
+    }
+
+    @Test
+    public void testThreadNamePattern() throws Exception {
+        assertEquals("Riding the thread #counter#", context.getExecutorServiceManager().getThreadNamePattern());
+
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+
+        template.sendBody("seda:start", "Hello World");
+
+        assertMockEndpointsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/TypeConverterRegistryStatisticsEnabledTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/TypeConverterRegistryStatisticsEnabledTest.java
new file mode 100644
index 0000000..e7d226c
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/TypeConverterRegistryStatisticsEnabledTest.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint;
+
+import org.apache.camel.spi.TypeConverterRegistry;
+import org.junit.Test;
+
+public class TypeConverterRegistryStatisticsEnabledTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/typeConverterRegistryStatisticsEnabledTest.xml";
+    }
+
+    @Test
+    public void testTypeConverterRegistry() throws Exception {
+        getMockEndpoint("mock:a").expectedMessageCount(2);
+
+        template.sendBody("direct:start", "3");
+        template.sendBody("direct:start", "7");
+
+        assertMockEndpointsSatisfied();
+
+        TypeConverterRegistry reg = context.getTypeConverterRegistry();
+        assertTrue("Should be enabled", reg.getStatistics().isStatisticsEnabled());
+
+        Long failed = reg.getStatistics().getFailedCounter();
+        assertEquals(0, failed.intValue());
+        Long miss = reg.getStatistics().getMissCounter();
+        assertEquals(0, miss.intValue());
+
+        try {
+            template.sendBody("direct:start", "foo");
+            fail("Should have thrown exception");
+        } catch (Exception e) {
+            // expected
+        }
+
+        // should now have a failed
+        failed = reg.getStatistics().getFailedCounter();
+        assertEquals(1, failed.intValue());
+        miss = reg.getStatistics().getMissCounter();
+        assertEquals(0, miss.intValue());
+
+        // reset
+        reg.getStatistics().reset();
+
+        failed = reg.getStatistics().getFailedCounter();
+        assertEquals(0, failed.intValue());
+        miss = reg.getStatistics().getMissCounter();
+        assertEquals(0, miss.intValue());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/AbstractRouteBuilder.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/AbstractRouteBuilder.java
new file mode 100644
index 0000000..0909c2b
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/AbstractRouteBuilder.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.builder;
+
+import org.apache.camel.builder.RouteBuilder;
+
+public abstract class AbstractRouteBuilder extends RouteBuilder {
+
+    protected abstract String getResult();
+    
+    @Override
+    public void configure() throws Exception {
+        from("direct:start").to(getResult());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/my/MyRouteBuilder.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/my/MyRouteBuilder.java
new file mode 100644
index 0000000..b582d0a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/builder/my/MyRouteBuilder.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.builder.my;
+
+import org.apache.camel.test.blueprint.builder.AbstractRouteBuilder;
+
+public class MyRouteBuilder extends AbstractRouteBuilder {
+
+    @Override
+    protected String getResult() {
+        return "mock:result";
+    }
+
+   
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.java
new file mode 100644
index 0000000..c5d4cab
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.cloud;
+
+import org.apache.camel.model.cloud.ServiceCallConfigurationDefinition;
+import org.apache.camel.model.cloud.StaticServiceCallServiceDiscoveryConfiguration;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class ServiceCallConfigurationTest extends CamelBlueprintTestSupport {
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.xml";
+    }
+
+    @Test
+    public void testServiceDiscoveryConfiguration() {
+        ServiceCallConfigurationDefinition conf1 = context.getServiceCallConfiguration("conf1");
+        assertNotNull("No ServiceCallConfiguration (1)", conf1);
+        assertNotNull("No ServiceDiscoveryConfiguration (1)", conf1.getServiceDiscoveryConfiguration());
+
+        StaticServiceCallServiceDiscoveryConfiguration discovery1 = (StaticServiceCallServiceDiscoveryConfiguration)conf1.getServiceDiscoveryConfiguration();
+        assertEquals(1, discovery1.getServers().size());
+        assertEquals("localhost:9091", discovery1.getServers().get(0));
+
+        ServiceCallConfigurationDefinition conf2 = context.getServiceCallConfiguration("conf2");
+        assertNotNull("No ServiceCallConfiguration (2)", conf2);
+        assertNotNull("No ServiceDiscoveryConfiguration (2)", conf2.getServiceDiscoveryConfiguration());
+
+        StaticServiceCallServiceDiscoveryConfiguration discovery2 = (StaticServiceCallServiceDiscoveryConfiguration)conf2.getServiceDiscoveryConfiguration();
+        assertEquals(2, discovery2.getServers().size());
+        assertEquals("localhost:9092", discovery2.getServers().get(0));
+        assertEquals("localhost:9093,localhost:9094", discovery2.getServers().get(1));
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.java
new file mode 100644
index 0000000..09efaa0
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.cloud;
+
+import org.apache.camel.Exchange;
+import org.apache.camel.cloud.ServiceCallConstants;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class ServiceCallFilterTest extends CamelBlueprintTestSupport {
+    @Test
+    public void testServiceFilter() throws Exception {
+        Exchange result;
+
+        result = template.request("direct:start", e -> { 
+            return; 
+        });
+
+        assertHeader(result, ServiceCallConstants.SERVICE_HOST, "host1");
+        assertHeader(result, ServiceCallConstants.SERVICE_PORT, 9093);
+
+        result = template.request("direct:start", e -> { 
+            return;
+        });
+
+        assertHeader(result, ServiceCallConstants.SERVICE_HOST, "host4");
+        assertHeader(result, ServiceCallConstants.SERVICE_PORT, 9094);
+    }
+
+    // *********************
+    // Helpers
+    // *********************
+
+    private void assertHeader(Exchange exchange, String header, Object expectedValue) {
+        Assert.assertNotNull(exchange);
+        Assert.assertTrue(exchange.getIn().getHeaders().containsKey(header));
+        Assert.assertEquals(expectedValue, exchange.getIn().getHeader(header));
+    }
+
+    // *********************
+    // Blueprint
+    // *********************
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.xml";
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/DummyRestConsumerFactory.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/DummyRestConsumerFactory.java
new file mode 100644
index 0000000..8245682
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/DummyRestConsumerFactory.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.component.seda.SedaEndpoint;
+import org.apache.camel.impl.engine.DefaultUuidGenerator;
+import org.apache.camel.spi.RestConfiguration;
+import org.apache.camel.spi.RestConsumerFactory;
+
+public class DummyRestConsumerFactory implements RestConsumerFactory {
+
+    @Override
+    public Consumer createConsumer(CamelContext camelContext, Processor processor, String verb, String basePath, String uriTemplate,
+                                   String consumes, String produces, RestConfiguration configuration, Map<String, Object> parameters) throws Exception {
+        // just use a seda endpoint for testing purpose
+        String id;
+        if (uriTemplate != null) {
+            id = DefaultUuidGenerator.generateSanitizedId(basePath + uriTemplate);
+        } else {
+            id = DefaultUuidGenerator.generateSanitizedId(basePath);
+        }
+        // remove leading dash as we add that ourselves
+        if (id.startsWith("-")) {
+            id = id.substring(1);
+        }
+        SedaEndpoint seda = camelContext.getEndpoint("seda:" + verb + "-" + id, SedaEndpoint.class);
+        return seda.createConsumer(processor);
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.java
new file mode 100644
index 0000000..05fb316
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.junit.Test;
+
+public class FromRestConfigurationTest extends FromRestGetTest {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml";
+    }
+
+    @Override
+    @Test
+    public void testFromRestModel() throws Exception {
+        super.testFromRestModel();
+
+        assertEquals("dummy-rest", context.getRestConfiguration().getComponent());
+        assertEquals("localhost", context.getRestConfiguration().getHost());
+        assertEquals(9090, context.getRestConfiguration().getPort());
+        assertEquals("bar", context.getRestConfiguration().getComponentProperties().get("foo"));
+        assertEquals("stuff", context.getRestConfiguration().getComponentProperties().get("other"));
+        assertEquals("200", context.getRestConfiguration().getEndpointProperties().get("size"));
+        assertEquals("1000", context.getRestConfiguration().getConsumerProperties().get("pollTimeout"));
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.java
new file mode 100644
index 0000000..f03a5c0
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.model.ToDefinition;
+import org.apache.camel.model.rest.RestDefinition;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class FromRestGetEmbeddedRouteTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.xml";
+    }
+
+    protected int getExpectedNumberOfRoutes() {
+        return 3;
+    }
+
+    @Test
+    public void testFromRestModel() throws Exception {
+        assertEquals(getExpectedNumberOfRoutes(), context.getRoutes().size());
+
+        assertEquals(2, context.getRestDefinitions().size());
+        RestDefinition rest = context.getRestDefinitions().get(0);
+        assertNotNull(rest);
+        assertEquals("/say/hello", rest.getPath());
+        assertEquals(1, rest.getVerbs().size());
+        ToDefinition to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getRoute().getOutputs().get(0));
+        assertEquals("mock:hello", to.getUri());
+
+        rest = context.getRestDefinitions().get(1);
+        assertNotNull(rest);
+        assertEquals("/say/bye", rest.getPath());
+        assertEquals(2, rest.getVerbs().size());
+        assertEquals("application/json", rest.getVerbs().get(0).getConsumes());
+        to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getRoute().getOutputs().get(0));
+        assertEquals("mock:bye", to.getUri());
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
+        getMockEndpoint("mock:update").expectedMessageCount(1);
+        template.sendBody("seda:post-say-bye", "I was here");
+        assertMockEndpointsSatisfied();
+
+        String out = template.requestBody("seda:get-say-hello", "Me", String.class);
+        assertEquals("Hello World", out);
+        String out2 = template.requestBody("seda:get-say-bye", "Me", String.class);
+        assertEquals("Bye World", out2);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.java
new file mode 100644
index 0000000..2b5948d
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class FromRestGetInterceptTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.xml";
+    }
+
+    @Test
+    public void testFromRestModel() throws Exception {
+        getMockEndpoint("mock:hello").expectedMessageCount(1);
+        getMockEndpoint("mock:bar").expectedMessageCount(1);
+        getMockEndpoint("mock:intercept").expectedMessageCount(3);
+
+        String out = template.requestBody("seda:get-say-hello", "I was here", String.class);
+        assertEquals("Bye World", out);
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetOnExceptionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetOnExceptionTest.java
new file mode 100644
index 0000000..7a91594
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetOnExceptionTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class FromRestGetOnExceptionTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestGetOnExceptionTest.xml";
+    }
+
+    @Test
+    public void testFromRestModel() throws Exception {
+        getMockEndpoint("mock:hello").expectedMessageCount(1);
+
+        String out = template.requestBody("seda:get-say-hello", "I was here", String.class);
+        assertEquals("Handled the error", out);
+
+        assertMockEndpointsSatisfied();
+    }
+
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetRouteOnExceptionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetRouteOnExceptionTest.java
new file mode 100644
index 0000000..db13b86
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetRouteOnExceptionTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+public class FromRestGetRouteOnExceptionTest extends FromRestGetOnExceptionTest {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestGetRouteOnExceptionTest.xml";
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
new file mode 100644
index 0000000..45ff7b5
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestGetTest.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import java.util.Arrays;
+
+import org.apache.camel.model.ToDefinition;
+import org.apache.camel.model.rest.CollectionFormat;
+import org.apache.camel.model.rest.RestDefinition;
+import org.apache.camel.model.rest.RestParamType;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class FromRestGetTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestGetTest.xml";
+    }
+
+    protected int getExpectedNumberOfRoutes() {
+        return 2 + 3;
+    }
+
+    @Test
+    public void testFromRestModel() throws Exception {
+        assertEquals(getExpectedNumberOfRoutes(), context.getRoutes().size());
+
+        assertEquals(2, context.getRestDefinitions().size());
+        RestDefinition rest = context.getRestDefinitions().get(0);
+        assertNotNull(rest);
+        assertEquals("/say/hello", rest.getPath());
+        assertEquals(1, rest.getVerbs().size());
+        ToDefinition to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getTo());
+        assertEquals("direct:hello", to.getUri());
+
+        rest = context.getRestDefinitions().get(1);
+        assertNotNull(rest);
+        assertEquals("/say/bye", rest.getPath());
+        assertEquals(2, rest.getVerbs().size());
+        assertEquals("application/json", rest.getVerbs().get(0).getConsumes());
+
+        assertEquals(2, rest.getVerbs().get(0).getParams().size());
+        assertEquals(RestParamType.header, rest.getVerbs().get(0).getParams().get(0).getType());
+        assertEquals(RestParamType.query, rest.getVerbs().get(0).getParams().get(1).getType());
+
+        assertEquals("header param description1", rest.getVerbs().get(0).getParams().get(0).getDescription());
+        assertEquals("header param description2", rest.getVerbs().get(0).getParams().get(1).getDescription());
+
+        assertEquals("integer", rest.getVerbs().get(0).getParams().get(0).getDataType());
+        assertEquals("string", rest.getVerbs().get(0).getParams().get(1).getDataType());
+        assertEquals(Arrays.asList("1", "2", "3", "4"), rest.getVerbs().get(0).getParams().get(0).getAllowableValues());
+        assertEquals(Arrays.asList("a", "b", "c", "d"), rest.getVerbs().get(0).getParams().get(1).getAllowableValues());
+        assertEquals("1", rest.getVerbs().get(0).getParams().get(0).getDefaultValue());
+        assertEquals("b", rest.getVerbs().get(0).getParams().get(1).getDefaultValue());
+
+        assertEquals(null, rest.getVerbs().get(0).getParams().get(0).getCollectionFormat());
+        assertEquals(CollectionFormat.multi, rest.getVerbs().get(0).getParams().get(1).getCollectionFormat());
+
+        assertEquals("header_count", rest.getVerbs().get(0).getParams().get(0).getName());
+        assertEquals("header_letter", rest.getVerbs().get(0).getParams().get(1).getName());
+        assertEquals(Boolean.TRUE, rest.getVerbs().get(0).getParams().get(0).getRequired());
+        assertEquals(Boolean.FALSE, rest.getVerbs().get(0).getParams().get(1).getRequired());
+
+        assertEquals("300", rest.getVerbs().get(0).getResponseMsgs().get(0).getCode());
+        assertEquals("rate", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getName());
+        assertEquals("Rate limit", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getDescription());
+        assertEquals("integer", rest.getVerbs().get(0).getResponseMsgs().get(0).getHeaders().get(0).getDataType());
+        assertEquals("test msg", rest.getVerbs().get(0).getResponseMsgs().get(0).getMessage());
+        assertEquals(Integer.class.getCanonicalName(), rest.getVerbs().get(0).getResponseMsgs().get(0).getResponseModel());
+        
+        to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getTo());
+        assertEquals("direct:bye", to.getUri());
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
+        getMockEndpoint("mock:update").expectedMessageCount(1);
+        template.sendBody("seda:post-say-bye", "I was here");
+        assertMockEndpointsSatisfied();
+
+        String out = template.requestBody("seda:get-say-hello", "Me", String.class);
+        assertEquals("Hello World", out);
+        String out2 = template.requestBody("seda:get-say-bye", "Me", String.class);
+        assertEquals("Bye World", out2);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.java
new file mode 100644
index 0000000..63f69bb
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.model.rest.RestDefinition;
+import org.junit.Test;
+
+public class FromRestIdAndDescriptionTest extends FromRestGetTest {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestIdAndDescriptionTest.xml";
+    }
+
+    @Override
+    @Test
+    public void testFromRestModel() throws Exception {
+        super.testFromRestModel();
+
+        RestDefinition rest = context.getRestDefinitions().get(0);
+        assertEquals("hello", rest.getId());
+        assertEquals("Hello Service", rest.getDescriptionText());
+
+        assertEquals("get-say", rest.getVerbs().get(0).getId());
+        assertEquals("Says hello to you", rest.getVerbs().get(0).getDescriptionText());
+
+        RestDefinition rest2 = context.getRestDefinitions().get(1);
+        assertEquals("bye", rest2.getId());
+        assertEquals("Bye Service", rest2.getDescriptionText());
+        assertEquals("en", rest2.getDescription().getLang());
+
+        assertEquals("Says bye to you", rest2.getVerbs().get(0).getDescriptionText());
+        assertEquals("Updates the bye message", rest2.getVerbs().get(1).getDescriptionText());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestUriPrefixTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestUriPrefixTest.java
new file mode 100644
index 0000000..669cc94
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/FromRestUriPrefixTest.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.model.ToDefinition;
+import org.apache.camel.model.rest.RestDefinition;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class FromRestUriPrefixTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/FromRestUriPrefixTest.xml";
+    }
+
+    protected int getExpectedNumberOfRoutes() {
+        return 2 + 3;
+    }
+
+    @Test
+    public void testFromRestModel() throws Exception {
+        assertEquals(getExpectedNumberOfRoutes(), context.getRoutes().size());
+
+        assertEquals(1, context.getRestDefinitions().size());
+        RestDefinition rest = context.getRestDefinitions().get(0);
+        assertNotNull(rest);
+        assertEquals("/say/", rest.getPath());
+        assertEquals(3, rest.getVerbs().size());
+        assertEquals("/hello", rest.getVerbs().get(0).getUri());
+        assertEquals("/bye", rest.getVerbs().get(1).getUri());
+        assertEquals("/hi", rest.getVerbs().get(2).getUri());
+        ToDefinition to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getTo());
+        assertEquals("direct:hello", to.getUri());
+        to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(1).getTo());
+        assertEquals("direct:bye", to.getUri());
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
+        getMockEndpoint("mock:update").expectedMessageCount(1);
+        template.sendBody("seda:post-say-hi", "I was here");
+        assertMockEndpointsSatisfied();
+
+        String out = template.requestBody("seda:get-say-hello", "Me", String.class);
+        assertEquals("Hello World", out);
+        String out2 = template.requestBody("seda:get-say-bye", "Me", String.class);
+        assertEquals("Bye World", out2);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/RestRefTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/RestRefTest.java
new file mode 100644
index 0000000..0191e35
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/component/rest/RestRefTest.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.component.rest;
+
+import org.apache.camel.model.ToDefinition;
+import org.apache.camel.model.rest.RestDefinition;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class RestRefTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/component/rest/RestRefTest.xml";
+    }
+
+    protected int getExpectedNumberOfRoutes() {
+        return 2 + 3;
+    }
+
+    @Test
+    public void testRestRefTest() throws Exception {
+        assertEquals(getExpectedNumberOfRoutes(), context.getRoutes().size());
+
+        assertEquals(2, context.getRestDefinitions().size());
+        RestDefinition rest = context.getRestDefinitions().get(0);
+        assertNotNull(rest);
+        assertEquals("/say/hello", rest.getPath());
+        assertEquals(1, rest.getVerbs().size());
+        ToDefinition to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getTo());
+        assertEquals("direct:hello", to.getUri());
+
+        rest = context.getRestDefinitions().get(1);
+        assertNotNull(rest);
+        assertEquals("/say/bye", rest.getPath());
+        assertEquals(2, rest.getVerbs().size());
+        assertEquals("application/json", rest.getVerbs().get(0).getConsumes());
+        to = assertIsInstanceOf(ToDefinition.class, rest.getVerbs().get(0).getTo());
+        assertEquals("direct:bye", to.getUri());
+
+        // the rest becomes routes and the input is a seda endpoint created by the DummyRestConsumerFactory
+        getMockEndpoint("mock:update").expectedMessageCount(1);
+        template.sendBody("seda:post-say-bye", "I was here");
+        assertMockEndpointsSatisfied();
+
+        String out = template.requestBody("seda:get-say-hello", "Me", String.class);
+        assertEquals("Hello World", out);
+        String out2 = template.requestBody("seda:get-say-bye", "Me", String.class);
+        assertEquals("Bye World", out2);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterRegressionTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterRegressionTest.java
new file mode 100644
index 0000000..4b1a6e8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterRegressionTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.apache.camel.test.blueprint.Foo;
+import org.junit.Test;
+
+public class CustomConverterRegressionTest extends CamelBlueprintTestSupport {
+    
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/converter/CustomConverterRegressionTest.xml";
+    }
+
+    @Test
+    public void testCustomConverter() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        getMockEndpoint("mock:result").message(0).body().isInstanceOf(Foo.class);
+
+        template.sendBody("direct:start", "John,Doe");
+
+        assertMockEndpointsSatisfied();
+
+        Foo foo = getMockEndpoint("mock:result").getReceivedExchanges().get(0).getIn().getBody(Foo.class);
+        assertEquals("John", foo.getFirst());
+        assertEquals("Doe", foo.getLast());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
new file mode 100644
index 0000000..e65b5cd
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/CustomConverterTest.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.apache.camel.test.blueprint.Foo;
+import org.junit.Test;
+
+public class CustomConverterTest extends CamelBlueprintTestSupport {
+    
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/converter/CustomConverterTest.xml";
+    }
+
+    @Test
+    public void testCustomConverter() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        getMockEndpoint("mock:result").message(0).body().isInstanceOf(Foo.class);
+
+        template.sendBody("direct:start", "John,Doe");
+
+        assertMockEndpointsSatisfied();
+
+        Foo foo = getMockEndpoint("mock:result").getReceivedExchanges().get(0).getIn().getBody(Foo.class);
+        assertEquals("John", foo.getFirst());
+        assertEquals("Doe", foo.getLast());
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java
new file mode 100644
index 0000000..91021f8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverter.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter;
+
+import org.apache.camel.Converter;
+import org.apache.camel.TypeConverters;
+import org.apache.camel.test.blueprint.Foo;
+
+public class FooConverter implements TypeConverters {
+
+    public FooConverter() {
+    }
+    
+    @Converter
+    public Foo convertToFoo(String data) {
+        String[] s = data.split(",");
+        Foo foo = new Foo();
+        foo.setFirst(s[0]);
+        foo.setLast(s[1]);
+        return foo;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverterRegression.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverterRegression.java
new file mode 100644
index 0000000..64dcc44
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter/FooConverterRegression.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter;
+
+import org.apache.camel.Converter;
+import org.apache.camel.test.blueprint.Foo;
+
+public class FooConverterRegression {
+
+    public FooConverterRegression() {
+    }
+    
+    @Converter
+    public Foo convertToFoo(String data) {
+        String[] s = data.split(",");
+        Foo foo = new Foo();
+        foo.setFirst(s[0]);
+        foo.setLast(s[1]);
+        return foo;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/Country.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/Country.java
new file mode 100644
index 0000000..4a50535
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/Country.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter2;
+
+public class Country {
+
+    private String iso;
+    private String name;
+
+    public String getIso() {
+        return iso;
+    }
+
+    public void setIso(String iso) {
+        this.iso = iso;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConverters.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConverters.java
new file mode 100644
index 0000000..97c4b4f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConverters.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter2;
+
+import org.apache.camel.Converter;
+import org.apache.camel.TypeConverters;
+
+public class MyConverters implements TypeConverters {
+
+    @Converter
+    public Country toCountry(String iso) {
+        Country answer = new Country();
+        answer.setIso("en");
+        answer.setName("England");
+        return answer;
+    }
+
+    @Converter
+    public String toIso(Country country) {
+        return country.getIso();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConvertersTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConvertersTest.java
new file mode 100644
index 0000000..8a0c7dd
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/converter2/MyConvertersTest.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.converter2;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class MyConvertersTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/converter2/MyConvertersTest.xml";
+    }
+
+    @Test
+    public void testConvertersShouldBeAddedAutomaticByBlueprint() throws Exception {
+        Country country = context.getTypeConverter().convertTo(Country.class, "en");
+        assertNotNull(country);
+        assertEquals("England", country.getName());
+
+        String iso = context.getTypeConverter().convertTo(String.class, country);
+        assertNotNull(iso);
+        assertEquals("en", iso);
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/health/HealthCheckRegistryTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/health/HealthCheckRegistryTest.java
new file mode 100644
index 0000000..3c20c13
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/health/HealthCheckRegistryTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.health;
+
+import java.util.Collection;
+import java.util.Optional;
+
+import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckRepository;
+import org.apache.camel.impl.health.RegistryRepository;
+import org.apache.camel.impl.health.RoutePerformanceCounterEvaluators;
+import org.apache.camel.impl.health.RoutesHealthCheckRepository;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Assert;
+import org.junit.Test;
+
+public class HealthCheckRegistryTest extends CamelBlueprintTestSupport {
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/health/HealthCheckRegistryTest.xml";
+    }
+
+    @Test
+    public void testRepositories() {
+        Collection<HealthCheckRepository> repos = HealthCheckRegistry.get(context).getRepositories();
+
+        Assert.assertNotNull(repos);
+        Assert.assertEquals(2, repos.size());
+        Assert.assertTrue(repos.stream().anyMatch(RegistryRepository.class::isInstance));
+        Assert.assertTrue(repos.stream().anyMatch(RoutesHealthCheckRepository.class::isInstance));
+
+        Optional<RoutesHealthCheckRepository> repo = repos.stream()
+            .filter(RoutesHealthCheckRepository.class::isInstance)
+            .map(RoutesHealthCheckRepository.class::cast)
+            .findFirst();
+
+        Assert.assertTrue(repo.isPresent());
+        Assert.assertEquals(2, repo.get().evaluators().count());
+        Assert.assertEquals(1, repo.get().evaluators().filter(RoutePerformanceCounterEvaluators.ExchangesFailed.class::isInstance).count());
+        Assert.assertEquals(1, repo.get().evaluators().filter(RoutePerformanceCounterEvaluators.LastProcessingTime.class::isInstance).count());
+        Assert.assertEquals(1, repo.get().evaluators("route-1").count());
+        Assert.assertEquals(1, repo.get().evaluators("route-1").filter(RoutePerformanceCounterEvaluators.ExchangesInflight.class::isInstance).count());
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedEndpointInjectRefEndpointTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedEndpointInjectRefEndpointTest.java
new file mode 100644
index 0000000..a69fc04
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedEndpointInjectRefEndpointTest.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.management;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class ManagedEndpointInjectRefEndpointTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected boolean useJmx() {
+        return true;
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/management/managedEndpointInjectRefEndpointTest.xml";
+    }
+
+    protected MBeanServer getMBeanServer() {
+        return context.getManagementStrategy().getManagementAgent().getMBeanServer();
+    }
+
+    @Test
+    public void testRef() throws Exception {
+        // JMX tests dont work well on AIX CI servers (hangs them)
+        if (isPlatform("aix")) {
+            return;
+        }
+        // don't test well on windows
+        if (isPlatform("windows")) {
+            return;
+        }
+
+        // fire a message to get it running
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        getMockEndpoint("foo").expectedMessageCount(1);
+        template.sendBody("direct:start", "Hello World");
+        assertMockEndpointsSatisfied();
+
+        MBeanServer mbeanServer = getMBeanServer();
+
+        Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=producers,*"), null);
+        assertEquals(2, set.size());
+
+        Set<String> uris = new HashSet<>(Arrays.asList("mock://foo", "mock://result"));
+        for (ObjectName on : set) {
+            boolean registered = mbeanServer.isRegistered(on);
+            assertTrue("Should be registered", registered);
+
+            String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
+            assertTrue(uri, uris.contains(uri));
+
+            // should be started
+            String state = (String) mbeanServer.getAttribute(on, "State");
+            assertEquals("Should be started", ServiceStatus.Started.name(), state);
+        }
+
+        set = mbeanServer.queryNames(new ObjectName("*:type=endpoints,*"), null);
+        assertEquals(4, set.size());
+
+        uris = new HashSet<>(Arrays.asList("direct://start", "mock://foo", "mock://result", "ref://foo"));
+        for (ObjectName on : set) {
+            boolean registered = mbeanServer.isRegistered(on);
+            assertTrue("Should be registered", registered);
+
+            String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
+            assertTrue(uri, uris.contains(uri));
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedIncludeHostNameTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedIncludeHostNameTest.java
new file mode 100644
index 0000000..730ed70
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedIncludeHostNameTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.management;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class ManagedNamePatternFixedIncludeHostNameTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected boolean useJmx() {
+        return true;
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/management/managedNamePatternFixedIncludeHostNameTest.xml";
+    }
+
+    @Override
+    protected String getBundleVersion() {
+        return "1.2.3";
+    }
+
+    @Test
+    public void testManagedNamePattern() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        template.sendBody("direct:start", "World");
+        assertMockEndpointsSatisfied();
+
+        MBeanServer mbeanServer = context.getManagementStrategy().getManagementAgent().getMBeanServer();
+
+        assertEquals("cool-1.2.3", context.getManagementName());
+
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=localhost/" + context.getManagementName()
+                + ",type=context,name=\"" + context.getName() + "\"");
+        assertTrue("Should be registered", mbeanServer.isRegistered(on));
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedTest.java
new file mode 100644
index 0000000..c563304
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedNamePatternFixedTest.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.management;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class ManagedNamePatternFixedTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected boolean useJmx() {
+        return true;
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/management/managedNamePatternFixedTest.xml";
+    }
+
+    @Override
+    protected String getBundleVersion() {
+        return "1.2.3";
+    }
+
+    @Test
+    public void testManagedNamePattern() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        template.sendBody("direct:start", "World");
+        assertMockEndpointsSatisfied();
+
+        MBeanServer mbeanServer = context.getManagementStrategy().getManagementAgent().getMBeanServer();
+
+        assertEquals("cool-1.2.3", context.getManagementName());
+
+        ObjectName on = ObjectName.getInstance("org.apache.camel:context=" + context.getManagementName()
+                + ",type=context,name=\"" + context.getName() + "\"");
+        assertTrue("Should be registered", mbeanServer.isRegistered(on));
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedRefEndpointTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedRefEndpointTest.java
new file mode 100644
index 0000000..0623f28
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/ManagedRefEndpointTest.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.management;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.apache.camel.ServiceStatus;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class ManagedRefEndpointTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected boolean useJmx() {
+        return true;
+    }
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/management/managedRefEndpointTest.xml";
+    }
+
+    protected MBeanServer getMBeanServer() {
+        return context.getManagementStrategy().getManagementAgent().getMBeanServer();
+    }
+
+    @Test
+    public void testRef() throws Exception {
+        // JMX tests dont work well on AIX CI servers (hangs them)
+        if (isPlatform("aix")) {
+            return;
+        }
+
+        // fire a message to get it running
+        getMockEndpoint("mock:result").expectedMessageCount(1);
+        getMockEndpoint("foo").expectedMessageCount(1);
+        template.sendBody("direct:start", "Hello World");
+        assertMockEndpointsSatisfied();
+
+        MBeanServer mbeanServer = getMBeanServer();
+
+        Set<ObjectName> set = mbeanServer.queryNames(new ObjectName("*:type=producers,*"), null);
+        assertEquals(2, set.size());
+
+        for (ObjectName on : set) {
+            boolean registered = mbeanServer.isRegistered(on);
+            assertTrue("Should be registered", registered);
+
+            String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
+            assertTrue(uri, uri.equals("mock://foo") || uri.equals("mock://result"));
+
+            // should be started
+            String state = (String) mbeanServer.getAttribute(on, "State");
+            assertEquals("Should be started", ServiceStatus.Started.name(), state);
+        }
+
+        set = mbeanServer.queryNames(new ObjectName("*:type=endpoints,*"), null);
+        assertEquals(4, set.size());
+
+        Set<String> uris = new HashSet<>(Arrays.asList("direct://start", "mock://foo", "mock://result", "ref://foo"));
+        for (ObjectName on : set) {
+            boolean registered = mbeanServer.isRegistered(on);
+            assertTrue("Should be registered", registered);
+
+            String uri = (String) mbeanServer.getAttribute(on, "EndpointUri");
+            assertTrue(uri, uris.contains(uri));
+        }
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/MyRouteBuilder.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/MyRouteBuilder.java
new file mode 100644
index 0000000..1d4026b
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/management/MyRouteBuilder.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.management;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.builder.RouteBuilder;
+
+public class MyRouteBuilder extends RouteBuilder {
+
+    @EndpointInject("ref:foo")
+    private Endpoint foo;
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start").routeId("foo")
+                .to(foo)
+                .to("mock:result");
+
+    }
+}
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan/MyCoolRoute.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan/MyCoolRoute.java
new file mode 100644
index 0000000..d65d4e5
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan/MyCoolRoute.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.scan;
+
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ *
+ */
+public class MyCoolRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+        from("direct:start").to("mock:a");
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan2/MyOtherCoolRoute.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan2/MyOtherCoolRoute.java
new file mode 100644
index 0000000..bdf7373
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/scan2/MyOtherCoolRoute.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.scan2;
+
+import org.apache.camel.Endpoint;
+import org.apache.camel.EndpointInject;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ *
+ */
+public class MyOtherCoolRoute extends RouteBuilder {
+
+    @EndpointInject("ref:foo")
+    private Endpoint foo;
+
+    @Override
+    public void configure() throws Exception {
+        from(foo).to("mock:a");
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterRouteContextWithNamespaceTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterRouteContextWithNamespaceTest.java
new file mode 100644
index 0000000..241744a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterRouteContextWithNamespaceTest.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.xpath;
+
+public class XPathFilterRouteContextWithNamespaceTest extends XPathFilterWithNamespaceTest {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/xpath/xpathFilterRouteContextWithNamespaceTest.xml";
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterWithNamespaceTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterWithNamespaceTest.java
new file mode 100644
index 0000000..17ff2f2
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathFilterWithNamespaceTest.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.xpath;
+
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class XPathFilterWithNamespaceTest extends CamelBlueprintTestSupport {
+
+    protected String matchingBody = "<person name='James' city='London' xmlns='http://example.com/person'/>";
+    protected String notMatchingBody = "<person name='Hiram' city='Tampa' xmlns='http://example.com/person'/>";
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/xpath/xpathFilterWithNamespaceTest.xml";
+    }
+
+    @Test
+    public void testSendMatchingMessage() throws Exception {
+        getMockEndpoint("mock:result").expectedBodiesReceived(matchingBody);
+
+        sendBody("direct:start", matchingBody);
+
+        assertMockEndpointsSatisfied();
+    }
+
+    @Test
+    public void testSendNotMatchingMessage() throws Exception {
+        getMockEndpoint("mock:result").expectedMessageCount(0);
+
+        sendBody("direct:start", notMatchingBody);
+
+        assertMockEndpointsSatisfied();
+    }
+
+}
diff --git a/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathHeaderNameTest.java b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathHeaderNameTest.java
new file mode 100644
index 0000000..ad9eb31
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/java/org/apache/camel/test/blueprint/xpath/XPathHeaderNameTest.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.test.blueprint.xpath;
+
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.blueprint.CamelBlueprintTestSupport;
+import org.junit.Test;
+
+public class XPathHeaderNameTest extends CamelBlueprintTestSupport {
+
+    @Override
+    protected String getBlueprintDescriptor() {
+        return "org/apache/camel/test/blueprint/xpath/XPathHeaderNameTest.xml";
+    }
+
+    @Test
+    public void testChoiceWithHeaderNamePremium() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:premium");
+        mock.expectedBodiesReceived("<response>OK</response>");
+        mock.expectedHeaderReceived("invoiceDetails", "<invoice orderType='premium'><person><name>Alan</name></person></invoice>");
+ 
+        template.sendBodyAndHeader("direct:in", "<response>OK</response>",
+                                   "invoiceDetails", "<invoice orderType='premium'><person><name>Alan</name></person></invoice>");
+
+        mock.assertIsSatisfied();
+    }
+
+    @Test
+    public void testChoiceWithHeaderNameStandard() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:standard");
+        mock.expectedBodiesReceived("<response>OK</response>");
+        mock.expectedHeaderReceived("invoiceDetails", "<invoice orderType='standard'><person><name>Alan</name></person></invoice>");
+ 
+        template.sendBodyAndHeader("direct:in", "<response>OK</response>",
+                                   "invoiceDetails", "<invoice orderType='standard'><person><name>Alan</name></person></invoice>");
+
+        mock.assertIsSatisfied();
+    }
+
+    @Test
+    public void testChoiceWithHeaderNameUnknown() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:unknown");
+        mock.expectedBodiesReceived("<response>OK</response>");
+        mock.expectedHeaderReceived("invoiceDetails", "<invoice />");
+ 
+        template.sendBodyAndHeader("direct:in", "<response>OK</response>",
+                                   "invoiceDetails", "<invoice />");
+
+        mock.assertIsSatisfied();
+    }
+}
diff --git a/components/camel-test-blueprint/src/test/resources/META-INF/services/org/apache/camel/TypeConverter b/components/camel-test-blueprint/src/test/resources/META-INF/services/org/apache/camel/TypeConverter
new file mode 100644
index 0000000..ae8dad1
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/META-INF/services/org/apache/camel/TypeConverter
@@ -0,0 +1,18 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+org.apache.camel.test.blueprint.converter.FooConverterRegression
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/etc/augmented.fallback.cfg b/components/camel-test-blueprint/src/test/resources/etc/augmented.fallback.cfg
new file mode 100644
index 0000000..f6ada0a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/etc/augmented.fallback.cfg
@@ -0,0 +1,23 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+source = direct:not-from-here
+TEST.source = direct:start
+
+# augmented TEST.destination should fall back to this
+destination = mock:result
+
diff --git a/components/camel-test-blueprint/src/test/resources/etc/augmented.no.fallback.cfg b/components/camel-test-blueprint/src/test/resources/etc/augmented.no.fallback.cfg
new file mode 100644
index 0000000..4dba59a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/etc/augmented.no.fallback.cfg
@@ -0,0 +1,23 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+source = direct:from-here
+TESTXXX.source = direct:not-from-here
+
+# augmented TEST.destination should fall back to this
+destination = mock:result
+
diff --git a/components/camel-test-blueprint/src/test/resources/etc/framework.properties b/components/camel-test-blueprint/src/test/resources/etc/framework.properties
new file mode 100644
index 0000000..17503c0
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/etc/framework.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+my.greeting=Camel
+my.context.messageHistory=false
diff --git a/components/camel-test-blueprint/src/test/resources/etc/otherstuff.cfg b/components/camel-test-blueprint/src/test/resources/etc/otherstuff.cfg
new file mode 100644
index 0000000..cb1d44f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/etc/otherstuff.cfg
@@ -0,0 +1,20 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+salutation=Adieu
+resonner=tiens!
+arrive=mock:otherResult
diff --git a/components/camel-test-blueprint/src/test/resources/etc/stuff.cfg b/components/camel-test-blueprint/src/test/resources/etc/stuff.cfg
new file mode 100644
index 0000000..a8666aa
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/etc/stuff.cfg
@@ -0,0 +1,20 @@
+## ------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+## http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ------------------------------------------------------------------------
+
+greeting=Bye
+echo=Yay
+destination=mock:result
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/log4j2.properties b/components/camel-test-blueprint/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..1f2795f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/log4j2.properties
@@ -0,0 +1,28 @@
+## ---------------------------------------------------------------------------
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You under the Apache License, Version 2.0
+## (the "License"); you may not use this file except in compliance with
+## the License.  You may obtain a copy of the License at
+##
+##      http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing, software
+## distributed under the License is distributed on an "AS IS" BASIS,
+## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+## See the License for the specific language governing permissions and
+## limitations under the License.
+## ---------------------------------------------------------------------------
+
+appender.file.type = File
+appender.file.name = file
+appender.file.fileName = target/camel-test-blueprint.log
+appender.file.layout.type = PatternLayout
+appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+appender.out.type = Console
+appender.out.name = out
+appender.out.layout.type = PatternLayout
+appender.out.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n
+rootLogger.level = INFO
+rootLogger.appenderRef.file.ref = file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/AttributeNewLineTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/AttributeNewLineTest.xml
new file mode 100644
index 0000000..90e7928
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/AttributeNewLineTest.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="seda:bar?timeout=10000
+              &amp;blockWhenFull=true"/>
+    </route>
+
+    <route>
+      <from uri="seda:bar?
+              timeout=10000&amp;
+              blockWhenFull=true"/>
+      <to uri="mock:bar"/>
+    </route>
+
+    <route>
+      <from uri="stub:GET    /v1/phonebook/companies/{companyCode}?oauth=OPTIONAL"/>
+      <to uri="mock:stub"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintAddServiceTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintAddServiceTest.xml
new file mode 100644
index 0000000..04c0777
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintAddServiceTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="bean:myService"/>
+      <to uri="mock:result"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.xml
new file mode 100644
index 0000000..fef5849
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintComponentPropertyPlaceholderTest.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xsi:schemaLocation="
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- blueprint property placeholders -->
+  <cm:property-placeholder persistent-id="my-placeholders">
+    <cm:default-properties>
+      <cm:property name="mySize" value="2"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <bean id="myseda" class="org.apache.camel.component.seda.SedaComponent">
+    <property name="queueSize" value="${mySize}"/>
+  </bean>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="myseda:foo"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.xml
new file mode 100644
index 0000000..0ceacf9
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintMultipleServiceTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="fakeservice1:mock"/>
+      <to uri="fakeservice2:mock"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.xml
new file mode 100644
index 0000000..90ca08f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintOptionalPropertiesDslTest.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- START SNIPPET: example -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:prop="http://camel.apache.org/schema/placeholder"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+    <!-- Notice in the declaration above, we have defined the prop prefix as the Camel placeholder namespace -->
+
+    <bean id="damn" class="java.lang.IllegalArgumentException">
+        <argument index="0" value="Damn"/>
+    </bean>
+
+    <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+        <propertyPlaceholder id="properties"
+                             location="classpath:org/apache/camel/test/blueprint/myproperties.properties"/>
+
+        <route>
+            <from uri="direct:start"/>
+            <multicast stopOnException="{{stop}}">
+                <to uri="mock:a"/>
+                <throwException ref="damn"/>
+                <to uri="mock:b"/>
+            </multicast>
+        </route>
+
+    </camelContext>
+
+</blueprint>
+<!-- END SNIPPET: example -->
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.xml
new file mode 100644
index 0000000..3403297
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintProduceConsumeImplicitPropertyTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+		   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+		   xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+	<camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+		<!-- no routes -->
+	</camelContext>
+
+	<!-- bean that has @Consume and @Produce -->
+	<bean id="fooService" class="org.apache.camel.test.blueprint.FooService" depends-on="myCamel">
+		<property name="fooEndpoint" value="seda:input"/>
+		<property name="barEndpoint" value="mock:result"/>
+	</bean>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
new file mode 100644
index 0000000..c99d661
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/BlueprintStreamCachingStrategyTest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- START SNIPPET: example -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext streamCache="true" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <streamCaching id="myCacheConfig" bufferSize="2048" spoolDirectory="target/cachedir" spoolThreshold="8192"/>
+
+    <route>
+      <from uri="direct:c"/>
+      <to uri="mock:c"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+<!-- END SNIPPET: example -->
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.xml
new file mode 100644
index 0000000..f546f49
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/ConfigAdminExtFileTest.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
+           xsi:schemaLocation="
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- in this example we have 2 blueprint property placeholders -->
+  <!-- Camel 2.12.1 onwards will favor placeholders from the last defined placeholders,
+       and also favor non-default placeholders values
+       (= meaning that when overriding default values then Camel uses them instead)
+   -->
+
+  <!-- a default placeholder to setup the file locations and some default values -->
+  <cm:property-placeholder persistent-id="stuff" placeholder-prefix="{{" placeholder-suffix="}}">
+    <cm:default-properties>
+      <cm:property name="my.resources.config.folder" value="src/test/resources"/>
+      <cm:property name="my.resources.config.file" value="framework.properties"/>
+      <!-- default value is true -->
+      <!-- but we override this value in framework.properties where we set it to false -->
+      <cm:property name="my.context.messageHistory" value="true"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <!-- extended placeholder that loads the file and have additional properties -->
+  <ext:property-placeholder id="my-blueprint-placeholder">
+    <ext:default-properties>
+      <ext:property name="my-version" value="framework_1.0"/>
+    </ext:default-properties>
+    <!-- define location of properties file -->
+    <ext:location>file:{{my.resources.config.folder}}/etc/{{my.resources.config.file}}</ext:location>
+  </ext:property-placeholder>
+
+  <!-- a bean that uses a blueprint property placeholder -->
+  <bean id="myCoolBean" class="org.apache.camel.test.blueprint.MyCoolBean">
+    <property name="say" value="${my.greeting}"/>
+  </bean>
+
+  <camelContext messageHistory="{{my.context.messageHistory}}" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <bean ref="myCoolBean" method="saySomething"/>
+      <to uri="mock:result"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/CustomIdIssuesTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/CustomIdIssuesTest.xml
new file mode 100644
index 0000000..5d83c3e
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/CustomIdIssuesTest.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route customId="true" id="myRoute">
+      <description>here is a sample which processes the input files
+        (leaving them in place - see the 'noop' flag)
+        then performs content based routing on the message using XPath</description>
+      <from uri="file:src/data?noop=true" customId="true" id="fromFile">
+        <description/>
+      </from>
+      <choice customId="true" id="myChoice">
+        <when customId="true" id="UK">
+          <xpath>/person/city = 'London'</xpath>
+          <log message="UK message" customId="true" id="ukLog"/>
+          <to uri="file:target/messages/uk" customId="true" id="ukOutput"/>
+        </when>
+        <otherwise>
+          <log message="Other message"/>
+          <to uri="file:target/messages/others"/>
+        </otherwise>
+      </choice>
+    </route>
+
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.xml
new file mode 100644
index 0000000..3a28ba3
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelLogExhaustedMessageHistoryTest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <camelContext errorHandlerRef="eh" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <errorHandler id="eh" type="DeadLetterChannel" deadLetterUri="mock:dead">
+      <redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="0" logHandled="true" logExhausted="true" logExhaustedMessageHistory="true"/>
+    </errorHandler>
+
+    <route>
+      <from uri="direct:start"/>
+      <log message="Incoming ${body}"/>
+      <throwException ref="forced"/>
+    </route>
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.xml
new file mode 100644
index 0000000..05c3cf8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DeadLetterChannelOnPrepareTestTest.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <bean id="myPrepare"
+        class="org.apache.camel.test.blueprint.DeadLetterChannelOnPrepareTestTest.MyPrepareProcessor"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint" errorHandlerRef="dlc">
+
+    <errorHandler id="dlc" type="DeadLetterChannel" deadLetterUri="mock:dead" onPrepareFailureRef="myPrepare"/>
+
+    <route>
+      <from uri="direct:start"/>
+      <log message="Incoming ${body}"/>
+      <throwException ref="forced"/>
+    </route>
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.xml
new file mode 100644
index 0000000..26e4e45
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerLogExhaustedMessageHistoryTest.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <camelContext errorHandlerRef="eh" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <errorHandler id="eh">
+      <redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="0" logExhausted="true" logExhaustedMessageHistory="true"/>
+    </errorHandler>
+
+    <route>
+      <from uri="direct:start"/>
+      <log message="Incoming ${body}"/>
+      <throwException ref="forced"/>
+    </route>
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.xml
new file mode 100644
index 0000000..3e3f265
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/DefaultErrorHandlerOnPrepareTestTest.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <bean id="myPrepare"
+        class="org.apache.camel.test.blueprint.DefaultErrorHandlerOnPrepareTestTest.MyPrepareProcessor"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint" errorHandlerRef="defaultEH">
+
+    <errorHandler id="defaultEH" type="DefaultErrorHandler" onPrepareFailureRef="myPrepare"/>
+
+    <route>
+      <from uri="direct:start"/>
+      <log message="Incoming ${body}"/>
+      <throwException ref="forced"/>
+    </route>
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/EndpointPropertyTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/EndpointPropertyTest.xml
new file mode 100644
index 0000000..a8a07f8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/EndpointPropertyTest.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- outside camelContext -->
+  <endpoint id="bar" uri="seda:bar" camelContextId="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+    <property key="size" value="200"/>
+  </endpoint>
+
+  <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <!-- inside camelContext -->
+    <endpoint id="foo" uri="seda:foo">
+      <property key="size" value="100"/>
+      <property key="pollTimeout" value="5000"/>
+      <property key="blockWhenFull" value="true"/>
+    </endpoint>
+
+    <route>
+      <from uri="ref:foo"/>
+      <to uri="mock:result"/>
+    </route>
+
+    <route>
+      <from uri="ref:bar"/>
+      <to uri="mock:result"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml
new file mode 100644
index 0000000..6f23f8b
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/IsMockEndpoints.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:camel="http://camel.apache.org/schema/blueprint" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="
+       http://www.osgi.org/xmlns/blueprint/v1.0.0
+       https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd       
+       http://camel.apache.org/schema/blueprint 
+       http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
+
+	<camelContext id="IsMockEndpoints" trace="false" xmlns="http://camel.apache.org/schema/blueprint">
+
+		<route id="IsMockEndpointsRoute">
+			<from uri="direct:foo" />
+			<setBody>
+				<simple>bar</simple>
+			</setBody>
+			<to uri="seda:result" />
+			<to uri="mock:bar" />
+		</route>
+		<route>
+			<from uri="seda:result" />
+			<setBody>
+				<simple>baz</simple>
+			</setBody>
+			<to uri="mock:baz" />
+		</route>
+
+	</camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.xml
new file mode 100644
index 0000000..493fe1e
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/MockEndpointsAndSkipTest.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="log:foo"/>
+      <to uri="seda:foo"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.xml
new file mode 100644
index 0000000..da5484f
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorOnExceptionTest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="myProcessor" class="org.apache.camel.test.blueprint.OnExceptionOccurredProcessorOnExceptionTest.MyProcessor"/>
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <camelContext errorHandlerRef="eh" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <errorHandler id="eh" deadLetterUri="mock:dead" type="DeadLetterChannel"/>
+
+    <onException onExceptionOccurredRef="myProcessor">
+      <exception>java.lang.Exception</exception>
+      <redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="0"/>
+    </onException>
+
+    <route>
+      <from uri="direct:start"/>
+      <throwException ref="forced"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.xml
new file mode 100644
index 0000000..5ac4a3a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionOccurredProcessorTest.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="myProcessor" class="org.apache.camel.test.blueprint.OnExceptionOccurredProcessorTest.MyProcessor"/>
+
+  <bean id="forced" class="java.lang.IllegalArgumentException">
+    <argument index="0" value="Forced"/>
+  </bean>
+
+  <camelContext errorHandlerRef="eh" xmlns="http://camel.apache.org/schema/blueprint">
+
+    <errorHandler id="eh" deadLetterUri="mock:dead" type="DeadLetterChannel" onExceptionOccurredRef="myProcessor">
+      <redeliveryPolicy maximumRedeliveries="3" redeliveryDelay="0"/>
+    </errorHandler>
+
+    <route>
+      <from uri="direct:start"/>
+      <throwException ref="forced"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.xml
new file mode 100644
index 0000000..34eaa91
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/OnExceptionRouteIdTest.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="myRoute" class="org.apache.camel.test.blueprint.OnExceptionRouteIdRouteBuilder"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+    <routeBuilder ref="myRoute"/>
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.xml
new file mode 100644
index 0000000..61a5706
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/PropertiesComponentFunctionTest.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <bean id="beerFunction" class="org.apache.camel.test.blueprint.PropertiesComponentFunctionTest.MyFunction"/>
+
+  <bean id="vmProperties" class="org.apache.camel.test.blueprint.MyProperties" />
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <propertyPlaceholder id="properties" location="ref:vmProperties" ignoreMissingLocation="true">
+      <propertiesFunction ref="beerFunction"/>
+    </propertyPlaceholder>
+
+    <route>
+      <from uri="direct:start"/>
+      <to uri="log:{{sys:os.name}}"/>
+      <to uri="{{beer:FOO}}"/>
+      <to uri="{{beer:BAR}}"/>
+    </route>
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.xml
new file mode 100644
index 0000000..ba8188a
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/SimpleWeaveAddMockLastTest.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="seda:start"/>
+      <transform>
+        <simple>Bye ${body}</simple>
+      </transform>
+      <to uri="seda:queue"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanInjectTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanInjectTest.xml
new file mode 100644
index 0000000..42ebe2e
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanInjectTest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xsi:schemaLocation="
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  
+  <bean id="foo" class="org.apache.camel.test.blueprint.FooBar" />
+  <bean id="myRoute" class="org.apache.camel.test.blueprint.BlueprintBeanInjectRoute" />
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+    <routeBuilder ref="myRoute"/>
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanStaticMethodRoute.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanStaticMethodRoute.xml
new file mode 100644
index 0000000..0872297
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/beanStaticMethodRoute.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+           xsi:schemaLocation="
+             http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  
+  <bean id="myRoute" class="org.apache.camel.test.blueprint.BlueprintStaticMethodRoute" />
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+    <routeBuilder ref="myRoute"/>
+  </camelContext>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelContext.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelContext.xml
new file mode 100644
index 0000000..a7763c9
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelContext.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<!-- START SNIPPET: example -->
+<!-- tag::example[] -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <route>
+      <from uri="direct:start"/>
+      <transform>
+        <simple>Hello ${body}</simple>
+      </transform>
+      <to uri="mock:a"/>
+    </route>
+
+  </camelContext>
+
+</blueprint>
+<!-- end::example[] -->
+<!-- END SNIPPET: example -->
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelEndpointInject.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelEndpointInject.xml
new file mode 100644
index 0000000..e09c2f8
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/camelEndpointInject.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+    <endpoint id="testEndpoint" uri="mock:result"/>
+  </camelContext>
+
+  <bean id="myProducer" class="org.apache.camel.test.blueprint.MyProducer"/>
+
+</blueprint>
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.xml
new file mode 100644
index 0000000..6baa6a1
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallConfigurationTest.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0
+             https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <serviceCallConfiguration id="conf1">
+      <staticServiceDiscovery>
+        <servers>localhost:9091</servers>
+      </staticServiceDiscovery>
+    </serviceCallConfiguration>
+
+    <serviceCallConfiguration id="conf2">
+      <staticServiceDiscovery>
+        <servers>localhost:9092</servers>
+        <servers>localhost:9093,localhost:9094</servers>
+      </staticServiceDiscovery>
+    </serviceCallConfiguration>
+
+    <route id="test1">
+      <from uri="direct:start1"/>
+      <serviceCall name="test" configurationRef="conf1"/>
+    </route>
+    <route id="test2">
+      <from uri="direct:start2"/>
+      <serviceCall name="test" configurationRef="conf2"/>
+    </route>
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.xml
new file mode 100644
index 0000000..d199501
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/cloud/ServiceCallFilterTest.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0
+             https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <interceptSendToEndpoint uri="file:*" skipSendToOriginalEndpoint="true">
+      <to uri="mock:result"/>
+    </interceptSendToEndpoint>
+
+    <route id="test">
+      <from uri="direct:start"/>
+      <serviceCall name="test" component="file">
+
+        <staticServiceDiscovery>
+          <servers>test@host1:9093</servers>
+          <servers>test@host2:9093</servers>
+          <servers>unknown@host1:9094</servers>
+          <servers>test@host3:9093</servers>
+          <servers>test@host4:9094</servers>
+        </staticServiceDiscovery>
+
+        <blacklistServiceFilter>
+          <servers>test@host2:9093</servers>
+          <servers>test@host3:9093</servers>
+        </blacklistServiceFilter>
+      </serviceCall>
+
+    </route>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
new file mode 100644
index 0000000..e9117c1
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestConfigurationTest.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- use a dummy rest consumer factory for the rest engine -->
+  <bean id="dummy-rest" class="org.apache.camel.test.blueprint.component.rest.DummyRestConsumerFactory"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <restConfiguration component="dummy-rest" host="localhost" port="9090">
+      <componentProperty key="foo" value="bar"/>
+      <componentProperty key="other" value="stuff"/>
+      <endpointProperty key="size" value="200"/>
+      <consumerProperty key="pollTimeout" value="1000"/>
+    </restConfiguration>
+
+    <rest path="/say/hello">
+      <get>
+        <to uri="direct:hello"/>
+      </get>
+    </rest>
+    <rest path="/say/bye">
+      <get consumes="application/json">
+        <param name="header_count" type="header" description="header param description1" dataType="integer" defaultValue="1" required="true">
+          <allowableValues>
+              <value>1</value>
+              <value>2</value>
+              <value>3</value>
+              <value>4</value>
+          </allowableValues>
+        </param>
+        <param name="header_letter" type="query" description="header param description2" dataType="string" defaultValue="b" collectionFormat="multi" required="false">
+          <allowableValues>
+              <value>a</value>
+              <value>b</value>
+              <value>c</value>
+              <value>d</value>
+          </allowableValues>
+        </param>
+        <responseMessage code="300" message="test msg" responseModel="java.lang.Integer">
+          <header name="rate" description="Rate limit" dataType="integer"/>
+        </responseMessage>
+        <to uri="direct:bye"/>
+      </get>
+      <post>
+        <to uri="mock:update"/>
+      </post>
+    </rest>
+
+    <route>
+      <from uri="direct:hello"/>
+      <transform>
+        <constant>Hello World</constant>
+      </transform>
+    </route>
+    <route>
+      <from uri="direct:bye"/>
+      <transform>
+        <constant>Bye World</constant>
+      </transform>
+    </route>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.xml
new file mode 100644
index 0000000..6fce700
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetEmbeddedRouteTest.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- use a dummy rest consumer factory for the rest engine -->
+  <bean id="dummy-rest" class="org.apache.camel.test.blueprint.component.rest.DummyRestConsumerFactory"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <rest path="/say/hello">
+      <get>
+        <route>
+          <to uri="mock:hello"/>
+          <transform>
+            <constant>Hello World</constant>
+          </transform>
+        </route>
+      </get>
+    </rest>
+    <rest path="/say/bye">
+      <get consumes="application/json">
+        <route>
+          <to uri="mock:bye"/>
+          <transform>
+            <constant>Bye World</constant>
+          </transform>
+        </route>
+      </get>
+      <post>
+        <to uri="mock:update"/>
+      </post>
+    </rest>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
diff --git a/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.xml b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.xml
new file mode 100644
index 0000000..9d54413
--- /dev/null
+++ b/components/camel-test-blueprint/src/test/resources/org/apache/camel/test/blueprint/component/rest/FromRestGetInterceptTest.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+         http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+           xsi:schemaLocation="
+             http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
+
+  <!-- use a dummy rest consumer factory for the rest engine -->
+  <bean id="dummy-rest" class="org.apache.camel.test.blueprint.component.rest.DummyRestConsumerFactory"/>
+
+  <camelContext xmlns="http://camel.apache.org/schema/blueprint">
+
+    <intercept>
+      <to uri="mock:intercept"/>
+    </intercept>
+
+    <rest path="/say/hello">
+      <get>
+        <route>
+          <to uri="mock:hello"/>
+          <to uri="mock:bar"/>
+          <transform>
+            <constant>Bye World</constant>
+          </transform>
+        </route>
+      </get>
+    </rest>
+
+  </camelContext>
+
+</blueprint>
\ No newline at end of file
... 2834 lines suppressed ...