You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/12/18 08:20:11 UTC

[1/4] camel git commit: CAMEL-8157 Fixed NPE error of camel-example-servlet-tomcat with the streamcache enabled.

Repository: camel
Updated Branches:
  refs/heads/camel-2.13.x 3f81b292e -> 18fdc5922
  refs/heads/camel-2.14.x ae435e34b -> 89ce39e84


CAMEL-8157 Fixed NPE error of camel-example-servlet-tomcat with the streamcache enabled.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7a36c753
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7a36c753
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7a36c753

Branch: refs/heads/camel-2.14.x
Commit: 7a36c753091040bb818c2e99072cf6d0148ea169
Parents: ae435e3
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Dec 18 12:23:36 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Dec 18 14:59:00 2014 +0800

----------------------------------------------------------------------
 .../camel/processor/CamelInternalProcessor.java |  7 ++-
 .../HttpClientRouteExampleSpringTest.java       | 48 +++++++++++++++++
 .../component/servlet/example-camelContext.xml  | 52 ++++++++++++++++++
 .../camel/component/servlet/web-example.xml     | 57 ++++++++++++++++++++
 4 files changed, 163 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/7a36c753/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
index 47c2311..099af1b 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
@@ -755,7 +755,12 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor {
 
         @Override
         public void after(Exchange exchange, StreamCache sc) throws Exception {
-            Object body = exchange.getIn().getBody();
+            Object body = null;
+            if (exchange.hasOut()) {
+                body = exchange.getOut().getBody();
+            } else {
+                body = exchange.getIn().getBody();
+            }
             if (body != null && body instanceof StreamCache) {
                 // reset so the cache is ready to be reused after processing
                 ((StreamCache) body).reset();

http://git-wip-us.apache.org/repos/asf/camel/blob/7a36c753/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
new file mode 100644
index 0000000..7530776
--- /dev/null
+++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.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.component.servlet;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletUnitClient;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HttpClientRouteExampleSpringTest extends ServletCamelRouterTestSupport {
+    @Test
+    public void testHttpRestricMethod() throws Exception {
+        
+        ServletUnitClient client = newClient();
+        // Send a web get method request
+        WebRequest  req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello");
+        WebResponse response = client.getResponse(req);
+        
+        System.out.println(response.getText());
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        startCamelContext = false;
+        super.setUp();
+    }
+   
+    protected String getConfiguration() {
+        return "/org/apache/camel/component/servlet/web-example.xml";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/7a36c753/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
new file mode 100644
index 0000000..13637de
--- /dev/null
+++ b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
@@ -0,0 +1,52 @@
+<?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"
+       xmlns:camel="http://camel.apache.org/schema/spring"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+   <camelContext id="camel" streamCache="true" xmlns="http://camel.apache.org/schema/spring" >
+    <route id="helloRoute">
+      <!-- incoming requests from the servlet is routed -->
+      <from uri="servlet:///hello"/>
+      <choice>
+        <when>
+          <!-- is there a header with the key name? -->
+          <header>name</header>
+          <!-- yes so return back a message to the user -->
+          <transform>
+            <simple>Hello ${header.name} how are you?</simple>
+          </transform>
+        </when>
+        <otherwise>
+          <!-- if no name parameter then output a syntax to the user -->
+          <transform>
+            <constant>Add a name parameter to uri, eg ?name=foo</constant>
+          </transform>
+        </otherwise>
+      </choice>
+    </route>
+   </camelContext>
+   
+   
+   
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/7a36c753/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
new file mode 100644
index 0000000..c39b313
--- /dev/null
+++ b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+  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: web -->
+<web-app>
+
+    <!-- tell Spring where it should load the XML file -->
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:org/apache/camel/component/servlet/example-camelContext.xml</param-value>
+    </context-param>
+
+    <!-- spring context listener which loads the XML file -->
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <!-- Camel Servlet -->
+    <servlet>
+        <servlet-name>CamelServlet</servlet-name>
+        <display-name>Camel Http Transport Servlet</display-name>
+        <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
+        <init-param>
+            <param-name>matchOnUriPrefix</param-name>
+            <param-value>true</param-value>
+        </init-param>
+    </servlet>
+
+    <!-- Camel Servlet mappings -->
+    <servlet-mapping>
+        <servlet-name>CamelServlet</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+
+</web-app>
+<!-- END SNIPPET: web -->
\ No newline at end of file


[3/4] camel git commit: CAMEL-8157 Fixed NPE error of camel-example-servlet-tomcat with the streamcache enabled.

Posted by ni...@apache.org.
CAMEL-8157 Fixed NPE error of camel-example-servlet-tomcat with the streamcache enabled.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b3237601
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b3237601
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b3237601

Branch: refs/heads/camel-2.13.x
Commit: b323760152c76f60cc7a6a0c11a5e6ef0a5517f4
Parents: 3f81b29
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Dec 18 12:23:36 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Dec 18 15:19:41 2014 +0800

----------------------------------------------------------------------
 .../camel/processor/CamelInternalProcessor.java |  7 ++-
 .../HttpClientRouteExampleSpringTest.java       | 48 +++++++++++++++++
 .../component/servlet/example-camelContext.xml  | 52 ++++++++++++++++++
 .../camel/component/servlet/web-example.xml     | 57 ++++++++++++++++++++
 4 files changed, 163 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b3237601/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
index 7ebd726..adc4ce8 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java
@@ -726,7 +726,12 @@ public class CamelInternalProcessor extends DelegateAsyncProcessor {
 
         @Override
         public void after(Exchange exchange, StreamCache sc) throws Exception {
-            Object body = exchange.getIn().getBody();
+            Object body = null;
+            if (exchange.hasOut()) {
+                body = exchange.getOut().getBody();
+            } else {
+                body = exchange.getIn().getBody();
+            }
             if (body != null && body instanceof StreamCache) {
                 // reset so the cache is ready to be reused after processing
                 ((StreamCache) body).reset();

http://git-wip-us.apache.org/repos/asf/camel/blob/b3237601/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
new file mode 100644
index 0000000..7530776
--- /dev/null
+++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.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.component.servlet;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletUnitClient;
+import org.junit.Before;
+import org.junit.Test;
+
+public class HttpClientRouteExampleSpringTest extends ServletCamelRouterTestSupport {
+    @Test
+    public void testHttpRestricMethod() throws Exception {
+        
+        ServletUnitClient client = newClient();
+        // Send a web get method request
+        WebRequest  req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello");
+        WebResponse response = client.getResponse(req);
+        
+        System.out.println(response.getText());
+    }
+
+    @Before
+    public void setUp() throws Exception {
+        startCamelContext = false;
+        super.setUp();
+    }
+   
+    protected String getConfiguration() {
+        return "/org/apache/camel/component/servlet/web-example.xml";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/camel/blob/b3237601/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
new file mode 100644
index 0000000..13637de
--- /dev/null
+++ b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/example-camelContext.xml
@@ -0,0 +1,52 @@
+<?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"
+       xmlns:camel="http://camel.apache.org/schema/spring"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
+    ">
+
+   <camelContext id="camel" streamCache="true" xmlns="http://camel.apache.org/schema/spring" >
+    <route id="helloRoute">
+      <!-- incoming requests from the servlet is routed -->
+      <from uri="servlet:///hello"/>
+      <choice>
+        <when>
+          <!-- is there a header with the key name? -->
+          <header>name</header>
+          <!-- yes so return back a message to the user -->
+          <transform>
+            <simple>Hello ${header.name} how are you?</simple>
+          </transform>
+        </when>
+        <otherwise>
+          <!-- if no name parameter then output a syntax to the user -->
+          <transform>
+            <constant>Add a name parameter to uri, eg ?name=foo</constant>
+          </transform>
+        </otherwise>
+      </choice>
+    </route>
+   </camelContext>
+   
+   
+   
+
+</beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/b3237601/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
new file mode 100644
index 0000000..c39b313
--- /dev/null
+++ b/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web-example.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!DOCTYPE web-app
+        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+        "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<!--
+  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: web -->
+<web-app>
+
+    <!-- tell Spring where it should load the XML file -->
+    <context-param>
+        <param-name>contextConfigLocation</param-name>
+        <param-value>classpath:org/apache/camel/component/servlet/example-camelContext.xml</param-value>
+    </context-param>
+
+    <!-- spring context listener which loads the XML file -->
+    <listener>
+        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+    </listener>
+
+    <!-- Camel Servlet -->
+    <servlet>
+        <servlet-name>CamelServlet</servlet-name>
+        <display-name>Camel Http Transport Servlet</display-name>
+        <servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
+        <init-param>
+            <param-name>matchOnUriPrefix</param-name>
+            <param-value>true</param-value>
+        </init-param>
+    </servlet>
+
+    <!-- Camel Servlet mappings -->
+    <servlet-mapping>
+        <servlet-name>CamelServlet</servlet-name>
+        <url-pattern>/services/*</url-pattern>
+    </servlet-mapping>
+
+</web-app>
+<!-- END SNIPPET: web -->
\ No newline at end of file


[4/4] camel git commit: CAMEL-8157 Polish the servlet unit test

Posted by ni...@apache.org.
CAMEL-8157 Polish the servlet unit test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/18fdc592
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/18fdc592
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/18fdc592

Branch: refs/heads/camel-2.13.x
Commit: 18fdc5922f667563bf2d0208aa104a9192fbfc1a
Parents: b323760
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Dec 18 15:05:34 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Dec 18 15:19:50 2014 +0800

----------------------------------------------------------------------
 .../component/servlet/HttpClientRouteExampleSpringTest.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/18fdc592/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
index 7530776..93aa600 100644
--- a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
+++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
@@ -32,7 +32,12 @@ public class HttpClientRouteExampleSpringTest extends ServletCamelRouterTestSupp
         WebRequest  req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello");
         WebResponse response = client.getResponse(req);
         
-        System.out.println(response.getText());
+        assertEquals("Get a wrong response message.", "OK", response.getResponseMessage());
+        assertEquals("Get a wrong response text.", "Add a name parameter to uri, eg ?name=foo", response.getText());
+        
+        req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello?name=Willem");
+        response = client.getResponse(req);
+        assertEquals("Get a wrong response text.", "Hello Willem how are you?", response.getText());
     }
 
     @Before


[2/4] camel git commit: CAMEL-8157 Polish the servlet unit test

Posted by ni...@apache.org.
CAMEL-8157 Polish the servlet unit test


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/89ce39e8
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/89ce39e8
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/89ce39e8

Branch: refs/heads/camel-2.14.x
Commit: 89ce39e848dcaa62dc0cacbd44bfb8d61645bb57
Parents: 7a36c75
Author: Willem Jiang <wi...@gmail.com>
Authored: Thu Dec 18 15:05:34 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Thu Dec 18 15:19:18 2014 +0800

----------------------------------------------------------------------
 .../component/servlet/HttpClientRouteExampleSpringTest.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/89ce39e8/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
----------------------------------------------------------------------
diff --git a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
index 7530776..93aa600 100644
--- a/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
+++ b/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteExampleSpringTest.java
@@ -32,7 +32,12 @@ public class HttpClientRouteExampleSpringTest extends ServletCamelRouterTestSupp
         WebRequest  req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello");
         WebResponse response = client.getResponse(req);
         
-        System.out.println(response.getText());
+        assertEquals("Get a wrong response message.", "OK", response.getResponseMessage());
+        assertEquals("Get a wrong response text.", "Add a name parameter to uri, eg ?name=foo", response.getText());
+        
+        req = new GetMethodWebRequest(CONTEXT_URL + "/services/hello?name=Willem");
+        response = client.getResponse(req);
+        assertEquals("Get a wrong response text.", "Hello Willem how are you?", response.getText());
     }
 
     @Before