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/25 10:22:22 UTC
[camel-karaf] 01/05: Added camel-itest-osgi module
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 d10545d0cfa2ff4c62fe264087cd9a777c083011
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 25 09:45:07 2020 +0100
Added camel-itest-osgi module
---
tests/camel-itest-osgi/README.adoc | 24 +++
tests/camel-itest-osgi/kill-karaf.sh | 28 +++
tests/camel-itest-osgi/pom.xml | 102 +++++++++++
tests/camel-itest-osgi/run-tests.sh | 73 ++++++++
.../src/main/resources/META-INF/LICENSE.txt | 203 +++++++++++++++++++++
.../src/main/resources/META-INF/NOTICE.txt | 11 ++
.../java/org/apache/camel/itest/CamelCoreTest.java | 58 ++++++
.../org/apache/camel/itest/CamelGroovyTest.java | 58 ++++++
.../org/apache/camel/itest/CamelHystrixTest.java | 60 ++++++
.../itest/CamelJacksonFallbackConverterTest.java | 66 +++++++
.../org/apache/camel/itest/CamelPgEventTest.java | 58 ++++++
.../camel/itest/CamelQuartzJmxUpdateTest.java | 172 +++++++++++++++++
.../apache/camel/itest/CamelSaxonEnabledTest.java | 61 +++++++
.../org/apache/camel/itest/CamelSaxonTest.java | 61 +++++++
.../apache/camel/itest/CamelTypeConverterTest.java | 82 +++++++++
.../itest/DuplicateNamespacePrefixIssueTest.java | 78 ++++++++
.../src/test/java/org/apache/camel/itest/Pojo.java | 77 ++++++++
.../camel/itest/cxf/BeanInjectRouteBuilder.java | 35 ++++
.../camel/itest/cxf/CamelCxfBeanInjectTest.java | 102 +++++++++++
.../org/apache/camel/itest/cxf/SimpleBean.java | 25 +++
.../org/apache/camel/itest/cxf/SimpleService.java | 21 +++
.../camel/itest/typeconverter/MyConverter.java | 39 ++++
.../src/test/resources/log4j2.properties | 23 +++
.../org/apache/camel/itest/CamelCoreTest.xml | 37 ++++
.../org/apache/camel/itest/CamelGroovyTest.xml | 37 ++++
.../org/apache/camel/itest/CamelHystrixTest.xml | 42 +++++
.../itest/CamelJacksonFallbackConverterTest.xml | 28 +++
.../org/apache/camel/itest/CamelPgEventTest.xml | 42 +++++
.../camel/itest/CamelQuartzJmxUpdateTest.xml | 35 ++++
.../apache/camel/itest/CamelSaxonEnabledTest.xml | 46 +++++
.../org/apache/camel/itest/CamelSaxonTest.xml | 46 +++++
.../org/apache/camel/itest/CamelSpringTest.xml | 38 ++++
.../apache/camel/itest/CamelTypeConverterTest.xml | 28 +++
.../camel/itest/cxf/CamelCxfBeanInjectTest.xml | 82 +++++++++
tests/pom.xml | 1 +
35 files changed, 1979 insertions(+)
diff --git a/tests/camel-itest-osgi/README.adoc b/tests/camel-itest-osgi/README.adoc
new file mode 100644
index 0000000..60ca9bb
--- /dev/null
+++ b/tests/camel-itest-osgi/README.adoc
@@ -0,0 +1,24 @@
+= Camel OSGi Integration Tests
+
+== Overview
+
+This module is where you should add cross component tests running on Karaf container.
+
+All tests are disabled by default to not run in the main CI job. Instead there is a separate CI job that only run the tests for each commit. The results are available here:
+https://builds.apache.org/blue/organizations/jenkins/Camel.trunk.itest.osgi/activity/
+
+== How to run the tests
+
+Do not use `mvn test`. Run the following script instead.
+----
+$ ./run-tests.sh
+----
+
+****
+The reason for not using `mvn test` is that each test starts up a Karaf instance using Pax Exam, but sometimes the instance doesn't shut down well after the test and the phantom instance causes silent failures of the successive tests. The `run-tests.sh` script makes sure to kill the Karaf instance after each test finished.
+****
+
+You can also pass in the test name to start testing from the test and onwards, e.g.:
+----
+$ ./run-tests.sh CamelHystrixTest
+----
\ No newline at end of file
diff --git a/tests/camel-itest-osgi/kill-karaf.sh b/tests/camel-itest-osgi/kill-karaf.sh
new file mode 100755
index 0000000..ec03c41
--- /dev/null
+++ b/tests/camel-itest-osgi/kill-karaf.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+#
+# 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.
+#
+
+XARGS_OPTIONS="-t -n1"
+if [ `uname` = "Linux" ]; then
+ XARGS_OPTIONS="$XARGS_OPTIONS --no-run-if-empty"
+fi
+
+echo "Listing all karaf processes"
+jps -l | grep karaf
+
+echo "Killing all karaf processes"
+jps -l | grep karaf | cut -d ' ' -f 1 | xargs $XARGS_OPTIONS kill
diff --git a/tests/camel-itest-osgi/pom.xml b/tests/camel-itest-osgi/pom.xml
new file mode 100644
index 0000000..fd26b15
--- /dev/null
+++ b/tests/camel-itest-osgi/pom.xml
@@ -0,0 +1,102 @@
+<?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/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.camel.karaf</groupId>
+ <artifactId>tests</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-itest-osgi</artifactId>
+ <name>Camel Karaf :: Integration Tests :: OSGi</name>
+ <description>Performs OSGi compliance integration tests</description>
+
+ <properties>
+ <karaf-test-version>${karaf4-version}</karaf-test-version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-karaf</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>apache-karaf</artifactId>
+ <version>${karaf-test-version}</version>
+ <type>tar.gz</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.dev</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.eclipse</groupId>
+ <artifactId>osgi</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.karaf</groupId>
+ <artifactId>org.apache.karaf.client</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-blueprint</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-jackson</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-cxf</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <rerunFailingTestsCount>0</rerunFailingTestsCount>
+ <systemPropertyVariables>
+ <karafVersion>${karaf4-version}</karafVersion>
+ <camelKarafFeatureVersion>${project.version}</camelKarafFeatureVersion>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
diff --git a/tests/camel-itest-osgi/run-tests.sh b/tests/camel-itest-osgi/run-tests.sh
new file mode 100755
index 0000000..f9d9184
--- /dev/null
+++ b/tests/camel-itest-osgi/run-tests.sh
@@ -0,0 +1,73 @@
+#!/bin/sh
+#
+# 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.
+#
+
+## This script runs the camel-itest-osgi in a more reliable way
+## than Maven surefire will do as it can hang after a while
+## The script also kills each karaf container after a test to ensure there is no Java JVMs
+## danging around.
+
+echo "Running tests and kill karaf after each test"
+
+## directory where the karaf unit tests are
+testdir='src/test/java/org/apache/camel/itest'
+
+## you can pass in the test name to start from eg run-tests.sh CamelHystrixTest
+## to start testing from this test and onwards.
+if [ "$#" -eq "0" ]
+then
+ found=1
+else
+ found=0
+fi
+
+## ensure the files are sorted
+for filename in $(ls -f $testdir/*Test* | sort);
+do
+ testname=$(basename ${filename%.*})
+
+ if [ $found -eq 0 ]
+ then
+ if [ $testname == "$1" ]
+ then
+ found=1
+ fi
+ fi
+
+ if [ $found -eq 1 ] && [ $testname != "AbstractFeatureTest" ]
+ then
+ echo "*******************************************************************"
+ echo "Running test $testname"
+ echo "*******************************************************************"
+ if mvn test -Dtest=$testname ; then
+ echo "\n"
+ echo "*******************************************************************"
+ echo "Test success: $testname"
+ echo "*******************************************************************"
+ echo "\n"
+ else
+ echo "\n"
+ echo "*******************************************************************"
+ echo "Test failure: $testname"
+ echo "*******************************************************************"
+ echo "\n"
+ exit 1;
+ fi
+ echo "Killing Karaf to ensure no dangling karaf running"
+ ./kill-karaf.sh
+ fi
+done
diff --git a/tests/camel-itest-osgi/src/main/resources/META-INF/LICENSE.txt b/tests/camel-itest-osgi/src/main/resources/META-INF/LICENSE.txt
new file mode 100644
index 0000000..6b0b127
--- /dev/null
+++ b/tests/camel-itest-osgi/src/main/resources/META-INF/LICENSE.txt
@@ -0,0 +1,203 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
+
diff --git a/tests/camel-itest-osgi/src/main/resources/META-INF/NOTICE.txt b/tests/camel-itest-osgi/src/main/resources/META-INF/NOTICE.txt
new file mode 100644
index 0000000..2e215bf
--- /dev/null
+++ b/tests/camel-itest-osgi/src/main/resources/META-INF/NOTICE.txt
@@ -0,0 +1,11 @@
+ =========================================================================
+ == NOTICE file corresponding to the section 4 d of ==
+ == the Apache License, Version 2.0, ==
+ == in this case for the Apache Camel distribution. ==
+ =========================================================================
+
+ This product includes software developed by
+ The Apache Software Foundation (http://www.apache.org/).
+
+ Please read the different LICENSE files present in the licenses directory of
+ this distribution.
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.java
new file mode 100644
index 0000000..1a9e930
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelCoreTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelCoreTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelCore() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelCoreTest.xml", CamelCoreTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelCoreTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+ mock.expectedBodiesReceived("Hello World");
+
+ camel.createProducerTemplate().sendBody("direct:start", "World");
+
+ mock.assertIsSatisfied();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelGroovyTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelGroovyTest.java
new file mode 100644
index 0000000..37a6e23
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelGroovyTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelGroovyTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelGroovy() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelGroovyTest.xml", CamelGroovyTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelGroovyTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+ mock.expectedBodiesReceived(6);
+
+ camel.createProducerTemplate().sendBody("direct:start", 3);
+
+ mock.assertIsSatisfied();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf", "camel-groovy");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelHystrixTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelHystrixTest.java
new file mode 100644
index 0000000..c63606c
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelHystrixTest.java
@@ -0,0 +1,60 @@
+/*
+ * 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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+@Ignore("Weird osgi linkage error")
+public class CamelHystrixTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelHystrix() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelHystrixTest.xml", CamelHystrixTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelHystrixTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+ mock.expectedBodiesReceived("Fallback message");
+
+ camel.createProducerTemplate().sendBody("direct:start", "Hello World");
+
+ mock.assertIsSatisfied();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf", "camel-hystrix");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelJacksonFallbackConverterTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelJacksonFallbackConverterTest.java
new file mode 100644
index 0000000..d83df0f
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelJacksonFallbackConverterTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.jackson.JacksonConstants;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+public class CamelJacksonFallbackConverterTest extends AbstractFeatureTest {
+
+ @Test
+ public void test() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelJacksonFallbackConverterTest.xml", CamelJacksonFallbackConverterTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelJacksonFallbackConverterTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // enable Jackson json type converter
+ camel.getGlobalOptions().put(JacksonConstants.ENABLE_TYPE_CONVERTER, "true");
+ // allow Jackson json to convert to pojo types also (by default jackson only converts to String and other simple types)
+ camel.getGlobalOptions().put(JacksonConstants.TYPE_CONVERTER_TO_POJO, "true");
+
+ final Pojo pojo = new Pojo(1337, "Constantine");
+
+ final DefaultExchange exchange = new DefaultExchange(camel);
+ final String string = camel.getTypeConverter().mandatoryConvertTo(String.class, exchange, pojo);
+ LOG.info("POJO -> String: {}", string);
+ final Pojo copy = camel.getTypeConverter().mandatoryConvertTo(Pojo.class, exchange, string);
+ LOG.info("String -> POJO: {}", copy);
+ Assert.assertEquals(pojo, copy);
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf", "camel-jackson");
+ }
+
+}
\ No newline at end of file
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelPgEventTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelPgEventTest.java
new file mode 100644
index 0000000..bdca497
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelPgEventTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@RunWith(PaxExam.class)
+@Ignore("Needs a running PostgreSQL instance")
+public class CamelPgEventTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelPgEvent() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelPgEventTest.xml", CamelPgEventTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelPgEventTest", url, true);
+ installCamelFeature("camel-pgevent");
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+ mock.expectedBodiesReceived("Hello World");
+
+ mock.assertIsSatisfied(5000);
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf");
+ }
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelQuartzJmxUpdateTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelQuartzJmxUpdateTest.java
new file mode 100644
index 0000000..83175d1
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelQuartzJmxUpdateTest.java
@@ -0,0 +1,172 @@
+/*
+ * 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.itest;
+
+import java.lang.management.ManagementFactory;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.TabularData;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+
+/**
+ * CAMEL-11471: Unable to update the cron details from Quartz scheduler MBean
+ */
+@RunWith(PaxExam.class)
+public class CamelQuartzJmxUpdateTest extends AbstractFeatureTest {
+
+ private static final Logger LOGGER = LoggerFactory.getLogger(CamelQuartzJmxUpdateTest.class);
+
+ @Test
+ public void testUpdateCronDetails() throws Exception {
+ // install camel-quartz here as 'wrap:' is not available at boot time
+ installCamelFeature("camel-quartz");
+
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelQuartzJmxUpdateTest.xml",
+ CamelQuartzJmxUpdateTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelQuartzJmxUpdateTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:result", MockEndpoint.class);
+ mock.expectedBodiesReceived("Hello World");
+ mock.assertIsSatisfied(5000);
+
+ doUpdateCronDetails();
+ }
+
+ private void doUpdateCronDetails() throws Exception {
+ String trigger = "myTimer";
+ String group = "myGroup";
+ String cronExpression = "0 * * * * ?";
+
+ MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
+ Set<ObjectName> objectNames = mBeanServer.queryNames(
+ new ObjectName("quartz:type=QuartzScheduler,name=*,instance=NON_CLUSTERED"), null);
+ assertFalse("There should be a quartz scheduler MBean", objectNames.isEmpty());
+
+ ObjectName oName = objectNames.stream().findFirst().get();
+ LOGGER.info("Scheduler MBean: {}", oName);
+
+ CompositeData triggerData = (CompositeData) mBeanServer.invoke(oName, "getTrigger",
+ new Object[]{trigger, group},
+ new String[]{"java.lang.String", "java.lang.String"});
+ String jobName = (String) triggerData.get("jobName");
+ String jobGroup = (String) triggerData.get("jobGroup");
+ CompositeData jobData = (CompositeData) mBeanServer.invoke(oName, "getJobDetail",
+ new Object[]{jobName, jobGroup},
+ new String[]{"java.lang.String", "java.lang.String"});
+
+ String original = getCronExpression(jobData);
+ assertNotEquals("make sure original cron is different", cronExpression, original);
+
+ Map<String, Object> jobInfo = createJobInfo(jobName, jobGroup, cronExpression, jobData);
+ Map<String, Object> triggerInfo = createTriggerInfo(trigger, group, cronExpression, jobName, jobGroup);
+
+ // update trigger
+ mBeanServer.invoke(oName, "scheduleBasicJob",
+ new Object[]{jobInfo, triggerInfo},
+ new String[]{"java.util.Map", "java.util.Map"});
+
+ // assert job details updated
+ CompositeData jobData2 = (CompositeData) mBeanServer.invoke(oName, "getJobDetail",
+ new Object[]{jobName, jobGroup},
+ new String[]{"java.lang.String", "java.lang.String"});
+ String updated = getCronExpression(jobData2);
+ assertEquals("cron should be updated", cronExpression, updated);
+ }
+
+ private String getCronExpression(CompositeData jobData) {
+ TabularData jobDataMap = (TabularData) jobData.get("jobDataMap");
+ CompositeData cron = jobDataMap.get(new String[]{"CamelQuartzTriggerCronExpression"});
+ Iterator it = cron.values().iterator();
+ it.next();
+ return (String) it.next();
+ }
+
+ private Map<String, Object> createJobInfo(String jobName, String jobGroup, String cronExpression,
+ CompositeData jobData) {
+ Map<String, Object> jobInfo = new HashMap<>();
+ jobInfo.put("name", jobName);
+ jobInfo.put("group", jobGroup);
+ if (jobData.get("description") != null) {
+ jobInfo.put("description", jobData.get("description"));
+ }
+ jobInfo.put("jobClass", jobData.get("jobClass"));
+ jobInfo.put("durability", jobData.get("durability"));
+ jobInfo.put("shouldRecover", jobData.get("shouldRecover"));
+
+ Map<String, Object> jobDataMap = new HashMap<>();
+ TabularData tJobDataMap = (TabularData) jobData.get("jobDataMap");
+ for (Object cKey : tJobDataMap.keySet()) {
+ Object key = ((List) cKey).get(0);
+ CompositeData cd = tJobDataMap.get(new Object[]{key});
+ if (cd != null) {
+ Iterator it = cd.values().iterator();
+ String tKey = (String) it.next();
+ Object tValue = it.next();
+ jobDataMap.put(tKey, tValue);
+ }
+ }
+ jobDataMap.put("CamelQuartzTriggerType", "cron");
+ jobDataMap.put("CamelQuartzTriggerCronExpression", cronExpression);
+ jobInfo.put("jobDataMap", jobDataMap);
+ return jobInfo;
+ }
+
+ private Map<String, Object> createTriggerInfo(String trigger, String group, String cronExpression,
+ String jobName, String jobGroup) {
+ Map<String, Object> triggerInfo = new HashMap<>();
+ triggerInfo.put("cronExpression", cronExpression);
+ triggerInfo.put("name", trigger);
+ triggerInfo.put("group", group);
+ triggerInfo.put("jobName", jobName);
+ triggerInfo.put("jobGroup", jobGroup);
+ triggerInfo.put("misfireInstruction", 1);
+ return triggerInfo;
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return configure("camel-test-karaf");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonEnabledTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonEnabledTest.java
new file mode 100644
index 0000000..e0e1b24
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonEnabledTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@Ignore
+@RunWith(PaxExam.class)
+public class CamelSaxonEnabledTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelSaxonEnabled() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelSaxonEnabledTest.xml", CamelSaxonEnabledTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelSaxonTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:camel", MockEndpoint.class);
+ mock.expectedBodiesReceived("<name>King</name>");
+ mock.expectedHeaderReceived("type", "Camel");
+
+ camel.createProducerTemplate().sendBodyAndHeader("direct:in", "<name>King</name>", "type", "Camel");
+
+ mock.assertIsSatisfied();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf", "camel-saxon");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonTest.java
new file mode 100644
index 0000000..22098cd
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelSaxonTest.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.itest;
+
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+@Ignore
+@RunWith(PaxExam.class)
+public class CamelSaxonTest extends AbstractFeatureTest {
+
+ @Test
+ public void testCamelSaxon() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelSaxonTest.xml", CamelSaxonTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelSaxonTest", url, true);
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ // test camel
+ MockEndpoint mock = camel.getEndpoint("mock:camel", MockEndpoint.class);
+ mock.expectedBodiesReceived("<name>King</name>");
+ mock.expectedHeaderReceived("type", "Camel");
+
+ camel.createProducerTemplate().sendBodyAndHeader("direct:in", "<name>King</name>", "type", "Camel");
+
+ mock.assertIsSatisfied();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf", "camel-saxon");
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.java
new file mode 100644
index 0000000..5b4cdcf
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/CamelTypeConverterTest.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.itest;
+
+import java.io.ByteArrayInputStream;
+import java.net.URL;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.itest.typeconverter.MyConverter;
+import org.apache.camel.support.DefaultExchange;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.test.karaf.CamelKarafTestSupport;
+import org.apache.camel.util.ObjectHelper;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.ProbeBuilder;
+import org.ops4j.pax.exam.TestProbeBuilder;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.InnerClassStrategy;
+import org.ops4j.pax.tinybundles.core.TinyBundle;
+import org.osgi.framework.Constants;
+
+@RunWith(PaxExam.class)
+public class CamelTypeConverterTest extends AbstractFeatureTest {
+
+ @Test
+ public void testTypeConverterInSameBundleAsCamelRoute() throws Exception {
+ // install the camel blueprint xml file and the Camel converter we use in this test
+ URL blueprintUrl = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/CamelTypeConverterTest.xml", CamelTypeConverterTest.class.getClassLoader());
+ installBlueprintAsBundle("CamelTypeConverterTest", blueprintUrl, true, bundle -> {
+ // install converter
+ ((TinyBundle) bundle)
+ .add("META-INF/services/org/apache/camel/TypeConverter", new ByteArrayInputStream("org.apache.camel.itest.typeconverter.MyConverter".getBytes()))
+ .add(MyConverter.class, InnerClassStrategy.NONE)
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*");
+ });
+
+ // lookup Camel from OSGi
+ CamelContext camel = getOsgiService(bundleContext, CamelContext.class);
+
+ final Pojo pojo = new Pojo();
+ String pojoName = "Constantine";
+ pojo.setName(pojoName);
+
+ final DefaultExchange exchange = new DefaultExchange(camel);
+ final String string = camel.getTypeConverter().mandatoryConvertTo(String.class, exchange, pojo);
+ LOG.info("POJO -> String: {}", string);
+ final Pojo copy = camel.getTypeConverter().mandatoryConvertTo(Pojo.class, exchange, string);
+ LOG.info("String -> POJO: {}", copy);
+ Assert.assertEquals(pojoName, copy.getName());
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return CamelKarafTestSupport.configure("camel-test-karaf");
+ }
+
+ @ProbeBuilder
+ public TestProbeBuilder probeConfiguration(TestProbeBuilder probe) {
+ // Export Pojo class for TypeConverter bundle
+ probe.setHeader(Constants.EXPORT_PACKAGE, "org.apache.camel.itest");
+ return probe;
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/DuplicateNamespacePrefixIssueTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/DuplicateNamespacePrefixIssueTest.java
new file mode 100644
index 0000000..8b1de84
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/DuplicateNamespacePrefixIssueTest.java
@@ -0,0 +1,78 @@
+/*
+ * 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.itest;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.ExtendedCamelContext;
+import org.apache.camel.blueprint.BlueprintCamelContext;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.model.Model;
+import org.apache.camel.model.RoutesDefinition;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+
+/**
+ * CAMEL-10817: dumpModelAsXml can return invalid XML namespace xmlns:xmlns
+ */
+@RunWith(PaxExam.class)
+public class DuplicateNamespacePrefixIssueTest extends AbstractFeatureTest {
+
+ @Test
+ public void testRoutesNamespacePrefixesNotDuplicated() throws Exception {
+ CamelContext context = new BlueprintCamelContext(bundleContext, blueprintContainer);
+ context.addRoutes(new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:foo").id("foo")
+ .choice()
+ .when(xpath("foo:foo/foo:foo = 'foo'"))
+ .log("Matched foo")
+ .when(xpath("foo:foo/foo:bar = 'bar'"))
+ .log("Matched bar")
+ .when(xpath("foo:foo/foo:cheese = 'cheese'"))
+ .log("Matched cheese");
+ }
+ });
+
+ // Dump the model XML
+ ExtendedCamelContext ecc = context.adapt(ExtendedCamelContext.class);
+ String originalModelXML = ecc.getModelToXMLDumper().dumpModelAsXml(context, context.getExtension(Model.class).getRouteDefinition("foo"));
+
+ // Reload routes from dumped XML
+ InputStream stream = new ByteArrayInputStream(originalModelXML.getBytes("UTF-8"));
+ RoutesDefinition routesDefinition = (RoutesDefinition) ecc.getXMLRoutesDefinitionLoader().loadRoutesDefinition(context, stream);
+
+ // Verify namespaces are as we expect
+ String modifiedModelXML = ecc.getModelToXMLDumper().dumpModelAsXml(context, routesDefinition);
+ String modifiedRoutesElementXML = modifiedModelXML.split("\n")[1];
+ String expectedRoutesElementXML = "<routes xmlns=\"http://camel.apache.org/schema/spring\">";
+ Assert.assertEquals(expectedRoutesElementXML, modifiedRoutesElementXML);
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return AbstractFeatureTest.configure();
+ }
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/Pojo.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/Pojo.java
new file mode 100644
index 0000000..576d789
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/Pojo.java
@@ -0,0 +1,77 @@
+/*
+ * 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.itest;
+
+public class Pojo {
+ private int id;
+ private String name;
+
+ public Pojo(int id, String name) {
+ this.id = id;
+ this.name = name;
+ }
+
+ public Pojo() {
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (!(o instanceof Pojo)) {
+ return false;
+ }
+
+
+ Pojo pojo = (Pojo) o;
+
+ if (id != pojo.getId()) {
+ return false;
+ }
+ return name != null ? name.equals(pojo.getName()) : pojo.getName() == null;
+
+ }
+
+ @Override
+ public int hashCode() {
+ int result = id;
+ result = 31 * result + (name != null ? name.hashCode() : 0);
+ return result;
+ }
+
+ @Override
+ public String toString() {
+ return "Pojo{" + "id=" + id + ", name='" + name + '\'' + '}';
+ }
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/BeanInjectRouteBuilder.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/BeanInjectRouteBuilder.java
new file mode 100644
index 0000000..d91736a
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/BeanInjectRouteBuilder.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.itest.cxf;
+
+import org.apache.camel.BeanInject;
+import org.apache.camel.builder.RouteBuilder;
+
+public class BeanInjectRouteBuilder extends RouteBuilder {
+
+ @BeanInject
+ private SimpleBean simpleBean;
+
+ @Override
+ public void configure() throws Exception {
+ from("cxf:bean:routerEndpoint")
+ .bean(simpleBean) // does nothing
+ .transform(simple("scheme: ${headers.CamelCxfMessage.get(HTTP.REQUEST).scheme}"
+ + ", x-forwarded-proto: ${headers.CamelCxfMessage.get(HTTP.REQUEST).getHeader(X-Forwarded-Proto)}"));
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
new file mode 100644
index 0000000..373d0d0
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.java
@@ -0,0 +1,102 @@
+/*
+ * 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.itest.cxf;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+import org.apache.camel.test.AvailablePortFinder;
+import org.apache.camel.test.karaf.AbstractFeatureTest;
+import org.apache.camel.util.ObjectHelper;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.frontend.ClientProxy;
+import org.apache.cxf.frontend.ClientProxyFactoryBean;
+import org.apache.cxf.message.Message;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Configuration;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.PaxExam;
+import org.ops4j.pax.tinybundles.core.InnerClassStrategy;
+import org.ops4j.pax.tinybundles.core.TinyBundle;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+
+@RunWith(PaxExam.class)
+@Ignore("Flaky on CI server")
+public class CamelCxfBeanInjectTest extends AbstractFeatureTest {
+
+ private static final int PORT = AvailablePortFinder.getNextAvailable();
+ private static final String ENDPOINT_ADDRESS = String.format(
+ "http://localhost:%s/CamelCxfBeanInjectTest/router", PORT);
+
+ @Before
+ public void installBlueprintXML() throws Exception {
+ // install the camel blueprint xml file we use in this test
+ URL url = ObjectHelper.loadResourceAsURL("org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.xml", CamelCxfBeanInjectTest.class.getClassLoader());
+ Bundle bundle = installBlueprintAsBundle("CamelCxfBeanInjectTest", url, false, b -> {
+ ((TinyBundle) b)
+ .add(BeanInjectRouteBuilder.class, InnerClassStrategy.NONE)
+ .add(SimpleService.class, InnerClassStrategy.NONE)
+ .add(SimpleBean.class, InnerClassStrategy.NONE)
+ .set(Constants.DYNAMICIMPORT_PACKAGE, "*");
+ });
+
+ Properties props = new Properties();
+ props.put("router.address", ENDPOINT_ADDRESS);
+ props.put("router.port", Integer.toString(PORT));
+ overridePropertiesWithConfigAdmin("my-placeholders", props);
+
+ bundle.start();
+ }
+
+ @Configuration
+ public Option[] configure() {
+ return configure("camel-test-karaf", "camel-cxf");
+ }
+
+ @Test
+ public void testReverseProxy() {
+ SimpleService client = createClient();
+ setHttpHeaders(client, "X-Forwarded-Proto", "https");
+
+ String result = client.op("test");
+ Assert.assertEquals("Scheme should be set to 'https'",
+ "scheme: https, x-forwarded-proto: https", result);
+ }
+
+ private void setHttpHeaders(SimpleService client, String header, String value) {
+ Map<String, List<String>> headers = new HashMap<>();
+ headers.put(header, Arrays.asList(value));
+ ClientProxy.getClient(client).getRequestContext().put(Message.PROTOCOL_HEADERS, headers);
+ }
+
+ private SimpleService createClient() {
+ ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
+ factory.setAddress(ENDPOINT_ADDRESS);
+ factory.setServiceClass(SimpleService.class);
+ factory.setBus(BusFactory.getDefaultBus());
+ return (SimpleService) factory.create();
+ }
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleBean.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleBean.java
new file mode 100644
index 0000000..0f83515
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleBean.java
@@ -0,0 +1,25 @@
+/*
+ * 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.itest.cxf;
+
+public class SimpleBean {
+
+ public String op(String message) {
+ return "<<< " + message + " >>>";
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleService.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleService.java
new file mode 100644
index 0000000..5902f66
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/cxf/SimpleService.java
@@ -0,0 +1,21 @@
+/*
+ * 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.itest.cxf;
+
+public interface SimpleService {
+ String op(String input);
+}
diff --git a/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/typeconverter/MyConverter.java b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/typeconverter/MyConverter.java
new file mode 100644
index 0000000..6b76d16
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/typeconverter/MyConverter.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.itest.typeconverter;
+
+import org.apache.camel.Converter;
+import org.apache.camel.itest.Pojo;
+
+@Converter
+public class MyConverter {
+
+ public MyConverter() { }
+
+ @Converter
+ public static Pojo toPojo(String name) {
+ Pojo pojo = new Pojo();
+ pojo.setName(name);
+ return pojo;
+ }
+
+ @Converter
+ public String toString(Pojo pojo) {
+ return pojo.getName();
+ }
+
+}
diff --git a/tests/camel-itest-osgi/src/test/resources/log4j2.properties b/tests/camel-itest-osgi/src/test/resources/log4j2.properties
new file mode 100644
index 0000000..d406a9f
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/log4j2.properties
@@ -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.
+## ---------------------------------------------------------------------------
+
+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.out.ref = out
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml
new file mode 100644
index 0000000..3f320ee
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelCoreTest.xml
@@ -0,0 +1,37 @@
+<?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">
+
+ <route>
+ <from uri="direct:start"/>
+ <transform>
+ <simple>Hello ${body}</simple>
+ </transform>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelGroovyTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelGroovyTest.xml
new file mode 100644
index 0000000..81039b8
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelGroovyTest.xml
@@ -0,0 +1,37 @@
+<?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">
+
+ <route>
+ <from uri="direct:start"/>
+ <transform>
+ <groovy>2 * body</groovy>
+ </transform>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelHystrixTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelHystrixTest.xml
new file mode 100644
index 0000000..e31b472
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelHystrixTest.xml
@@ -0,0 +1,42 @@
+<?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">
+
+ <route>
+ <from uri="direct:start"/>
+ <circuitBreaker>
+ <throwException exceptionType="java.lang.IllegalArgumentException" message="Forced"/>
+ <onFallback>
+ <transform>
+ <constant>Fallback message</constant>
+ </transform>
+ </onFallback>
+ </circuitBreaker>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelJacksonFallbackConverterTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelJacksonFallbackConverterTest.xml
new file mode 100644
index 0000000..f47bb35
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelJacksonFallbackConverterTest.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"
+ 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">
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelPgEventTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelPgEventTest.xml
new file mode 100644
index 0000000..6f61acd
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelPgEventTest.xml
@@ -0,0 +1,42 @@
+<?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">
+
+ <route>
+ <from uri="timer://test?repeatCount=1&period=1"/>
+ <setBody>
+ <constant>Hello World</constant>
+ </setBody>
+ <to uri="pgevent://localhost:5432/postgres/testchannel?user=postgres&pass=mysecretpassword"/>
+ </route>
+
+ <route>
+ <from uri="pgevent://localhost:5432/postgres/testchannel?user=postgres&pass=mysecretpassword"/>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelQuartzJmxUpdateTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelQuartzJmxUpdateTest.xml
new file mode 100644
index 0000000..6eb956e
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelQuartzJmxUpdateTest.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">
+ <route>
+ <from uri="quartz://myGroup/myTimer?cron=0/1 * * * * ?" />
+ <transform>
+ <constant>Hello World</constant>
+ </transform>
+ <to uri="mock:result" />
+ </route>
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonEnabledTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonEnabledTest.xml
new file mode 100644
index 0000000..dff03e5
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonEnabledTest.xml
@@ -0,0 +1,46 @@
+<?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">
+
+ <route>
+ <from uri="direct:in"/>
+ <choice>
+ <when>
+ <xpath saxon="true">$type = 'Camel'</xpath>
+ <to uri="mock:camel"/>
+ </when>
+ <when>
+ <xpath saxon="true">//name = 'Kong'</xpath>
+ <to uri="mock:donkey"/>
+ </when>
+ <otherwise>
+ <to uri="mock:other"/>
+ </otherwise>
+ </choice>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonTest.xml
new file mode 100644
index 0000000..159aa66
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSaxonTest.xml
@@ -0,0 +1,46 @@
+<?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">
+
+ <route>
+ <from uri="direct:in"/>
+ <choice>
+ <when>
+ <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">$type = 'Camel'</xpath>
+ <to uri="mock:camel"/>
+ </when>
+ <when>
+ <xpath objectModel="http://saxon.sf.net/jaxp/xpath/om">//name = 'Kong'</xpath>
+ <to uri="mock:donkey"/>
+ </when>
+ <otherwise>
+ <to uri="mock:other"/>
+ </otherwise>
+ </choice>
+ </route>
+
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSpringTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSpringTest.xml
new file mode 100644
index 0000000..96b1d4b
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelSpringTest.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.
+
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
+
+ <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/spring">
+
+ <route>
+ <from uri="direct:start"/>
+ <transform>
+ <simple>Bye ${body}</simple>
+ </transform>
+ <to uri="mock:result"/>
+ </route>
+
+ </camelContext>
+
+</beans>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.xml
new file mode 100644
index 0000000..f47bb35
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/CamelTypeConverterTest.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"
+ 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">
+ </camelContext>
+
+</blueprint>
diff --git a/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.xml b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.xml
new file mode 100644
index 0000000..cddbd14
--- /dev/null
+++ b/tests/camel-itest-osgi/src/test/resources/org/apache/camel/itest/cxf/CamelCxfBeanInjectTest.xml
@@ -0,0 +1,82 @@
+<?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:cxf="http://camel.apache.org/schema/blueprint/cxf"
+ xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+ xsi:schemaLocation="
+ http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
+ http://camel.apache.org/schema/blueprint/cxf http://camel.apache.org/schema/blueprint/cxf/camel-cxf.xsd
+ http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+ http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.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" update-strategy="reload">
+ <cm:default-properties>
+ <cm:property name="router.address" value="http://localhost:9000/routerEndpoint" />
+ <cm:property name="router.port" value="9000" />
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <!-- configuration for reverse proxy -->
+ <httpj:engine-factory bus="cxf">
+ <httpj:engine port="${router.port}">
+ <httpj:connector>
+ <bean id="connector" class="org.eclipse.jetty.server.ServerConnector">
+ <argument ref="server" />
+ <argument>
+ <array>
+ <ref component-id="httpConnectionFactory" />
+ </array>
+ </argument>
+ <property name="port" value="${router.port}" />
+ </bean>
+ </httpj:connector>
+ </httpj:engine>
+ </httpj:engine-factory>
+
+ <bean id="server" class="org.eclipse.jetty.server.Server" />
+
+ <bean id="httpConfiguration" class="org.eclipse.jetty.server.HttpConfiguration">
+ <property name="customizers">
+ <list>
+ <bean class="org.eclipse.jetty.server.ForwardedRequestCustomizer" />
+ </list>
+ </property>
+ </bean>
+
+ <bean id="httpConnectionFactory" class="org.eclipse.jetty.server.HttpConnectionFactory">
+ <argument ref="httpConfiguration" />
+ </bean>
+
+ <cxf:cxfEndpoint id="routerEndpoint" address="{{router.address}}"
+ serviceClass="org.apache.camel.itest.cxf.SimpleService" />
+
+ <bean id="routeBuilder" class="org.apache.camel.itest.cxf.BeanInjectRouteBuilder" />
+
+ <bean id="simpleBean" class="org.apache.camel.itest.cxf.SimpleBean" />
+
+ <camelContext id="myCamel" xmlns="http://camel.apache.org/schema/blueprint">
+ <routeBuilder ref="routeBuilder" />
+ </camelContext>
+
+</blueprint>
diff --git a/tests/pom.xml b/tests/pom.xml
index 873e96a..573193b 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -40,6 +40,7 @@
<modules>
<module>camel-blueprint-cxf-test</module>
<module>camel-blueprint-test</module>
+ <module>camel-itest-osgi</module>
</modules>
<build>