You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/02/23 11:09:59 UTC

svn commit: r915267 - in /camel/trunk: components/camel-restlet/ components/camel-restlet/src/test/java/org/apache/camel/component/restlet/ platforms/karaf/features/src/main/resources/

Author: davsclaus
Date: Tue Feb 23 10:09:58 2010
New Revision: 915267

URL: http://svn.apache.org/viewvc?rev=915267&view=rev
Log:
CAMEL-2438: Upgraded camel-restlet to use httpclient 4.0.1 for testing. Also removed the dep on camel-http as its not needed.

Added:
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java   (with props)
Modified:
    camel/trunk/components/camel-restlet/pom.xml
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiMethodsEndpointTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiUriTemplatesEndpointTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletQueryTest.java
    camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java
    camel/trunk/platforms/karaf/features/src/main/resources/features.xml

Modified: camel/trunk/components/camel-restlet/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/pom.xml?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/pom.xml (original)
+++ camel/trunk/components/camel-restlet/pom.xml Tue Feb 23 10:09:58 2010
@@ -37,6 +37,14 @@
         </camel.osgi.export.pkg>
   </properties>
 
+  <repositories>
+    <repository>
+      <id>maven-restlet</id>
+      <name>Public online Restlet repository</name>
+      <url>http://maven.restlet.org</url>
+    </repository>
+  </repositories>
+
   <dependencies>
     <dependency>
       <groupId>org.apache.camel</groupId>
@@ -44,11 +52,6 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-http</artifactId>
-    </dependency>
-
-    <dependency>
       <groupId>org.restlet</groupId>
       <artifactId>org.restlet</artifactId>
     </dependency>
@@ -73,8 +76,9 @@
     </dependency>
 
     <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+      <version>${httpclient4-version}</version>
       <scope>test</scope>
     </dependency>
     
@@ -103,12 +107,5 @@
     </dependency>
 
   </dependencies>
-  <repositories>
-    <repository>
-      <id>maven-restlet</id>
-      <name>Public online Restlet repository</name>
-      <url>http://maven.restlet.org</url>
-    </repository>
-  </repositories>
 
 </project>

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletExceptionResponseTest.java Tue Feb 23 10:09:58 2010
@@ -19,17 +19,16 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.util.EntityUtils;
 import org.junit.Test;
 
 /**
  *
  * @version $Revision$
  */
-public class RestletExceptionResponseTest extends CamelTestSupport {
+public class RestletExceptionResponseTest extends RestletTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
@@ -48,16 +47,11 @@
 
     @Test
     public void testExceptionResponse() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(500, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue().startsWith("text/plain"));
-            String body = method.getResponseBodyAsString();
-            assertTrue(body.contains("IllegalArgumentException"));
-            assertTrue(body.contains("Damn something went wrong"));
-        } finally {
-            method.releaseConnection();
-        }
+    	HttpResponse response = doExecute(new HttpPost("http://localhost:9080/users/homer"));
+    	String body = EntityUtils.toString(response.getEntity());
+    	
+    	assertHttpResponse(response, 500, "text/plain");
+        assertTrue(body.contains("IllegalArgumentException"));
+        assertTrue(body.contains("Damn something went wrong"));
     }
 }
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletFaultTest.java Tue Feb 23 10:09:58 2010
@@ -19,17 +19,15 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpPost;
 import org.junit.Test;
 
 /**
  *
  * @version $Revision$
  */
-public class RestletFaultTest extends CamelTestSupport {
+public class RestletFaultTest extends RestletTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
@@ -51,14 +49,8 @@
     
     @Test
     public void testFaultResponse() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(404, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue()
-                    .startsWith("text/plain"));
-        } finally {
-            method.releaseConnection();
-        }
+    	HttpResponse response = doExecute(new HttpPost("http://localhost:9080/users/homer"));
+    	
+    	assertHttpResponse(response, 404, "text/plain", "Application fault");
     }
-}
+}
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiMethodsEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiMethodsEndpointTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiMethodsEndpointTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiMethodsEndpointTest.java Tue Feb 23 10:09:58 2010
@@ -19,11 +19,9 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
 import org.junit.Test;
 
 /**
@@ -31,33 +29,20 @@
  * 
  * @version $Revision$
  */
-public class RestletMultiMethodsEndpointTest extends CamelTestSupport {
+public class RestletMultiMethodsEndpointTest extends RestletTestSupport {
 
     @Test
     public void testPostMethod() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue().startsWith("text/plain"));
-            assertEquals("POST", method.getResponseBodyAsString());
-        } finally {
-            method.releaseConnection();
-        }
-
+    	HttpResponse response = doExecute(new HttpPost("http://localhost:9080/users/homer"));
+    	
+    	assertHttpResponse(response, 200, "text/plain", "POST");
     }
 
     @Test
     public void testGetMethod() throws Exception {
-        HttpMethod method = new GetMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue().startsWith("text/plain"));
-            assertEquals("GET", method.getResponseBodyAsString());
-        } finally {
-            method.releaseConnection();
-        }
+    	HttpResponse response = doExecute(new HttpGet("http://localhost:9080/users/homer"));
+    	
+    	assertHttpResponse(response, 200, "text/plain", "GET");
     }
 
     protected RouteBuilder createRouteBuilder() {
@@ -71,12 +56,10 @@
                             // echo the method
                             exchange.getOut().setBody(exchange.getIn().getHeader(Exchange.HTTP_METHOD,
                                                                                  String.class));
-
                         }
                     });
                 // END SNIPPET: routeDefinition
             }
         };
     }
-
-}
+}
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiUriTemplatesEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiUriTemplatesEndpointTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiUriTemplatesEndpointTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletMultiUriTemplatesEndpointTest.java Tue Feb 23 10:09:58 2010
@@ -23,11 +23,9 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.JndiRegistry;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpPost;
 import org.junit.Test;
 
 /**
@@ -35,7 +33,7 @@
  * 
  * @version $Revision$
  */
-public class RestletMultiUriTemplatesEndpointTest extends CamelTestSupport {
+public class RestletMultiUriTemplatesEndpointTest extends RestletTestSupport {
 
     @Override
     protected JndiRegistry createRegistry() throws Exception {
@@ -50,30 +48,16 @@
 
     @Test
     public void testPostUserUriPattern() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue().startsWith("text/plain"));
-            assertEquals("POST homer", method.getResponseBodyAsString());
-        } finally {
-            method.releaseConnection();
-        }
-
+    	HttpResponse response = doExecute(new HttpPost("http://localhost:9080/users/homer"));
+    	
+    	assertHttpResponse(response, 200, "text/plain", "POST homer");
     }
 
     @Test
     public void testGetAtomUriPattern() throws Exception {
-        HttpMethod method = new GetMethod("http://localhost:9080/atom/collection/foo/component/bar");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue().startsWith("text/plain"));
-            assertEquals("GET foo bar", method.getResponseBodyAsString());
-        } finally {
-            method.releaseConnection();
-        }
-
+    	HttpResponse response = doExecute(new HttpGet("http://localhost:9080/atom/collection/foo/component/bar"));
+    	
+    	assertHttpResponse(response, 200, "text/plain", "GET foo bar");
     }
 
     @Override
@@ -93,15 +77,11 @@
                             } else if ("http://localhost:9080/atom/collection/foo/component/bar".equals(uri)) {
                                 exchange.getOut().setBody(out + " " + exchange.getIn().getHeader("id", String.class)
                                                           + " " + exchange.getIn().getHeader("cid", String.class));
-
                             }
-
                         }
                     });
                 // END SNIPPET: routeDefinition
-
             }
         };
     }
-
-}
+}
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletPostContentTest.java Tue Feb 23 10:09:58 2010
@@ -19,20 +19,18 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
-import org.apache.commons.httpclient.methods.RequestEntity;
-import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.StringEntity;
 import org.junit.Test;
 
 /**
  *
  * @version $Revision$
  */
-public class RestletPostContentTest extends CamelTestSupport {
+public class RestletPostContentTest extends RestletTestSupport {
 
     private static final String MSG_BODY = "Hello World!";
 
@@ -54,20 +52,15 @@
         public void process(Exchange exchange) throws Exception {   
             assertEquals(MSG_BODY, exchange.getIn().getBody(String.class));
         }
-        
     }
     
     @Test
     public void testPostBody() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            RequestEntity requestEntity = new StringRequestEntity(MSG_BODY, null, null);
-            ((EntityEnclosingMethod)method).setRequestEntity(requestEntity);
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-        } finally {
-            method.releaseConnection();
-        }
-
+    	HttpUriRequest method = new HttpPost("http://localhost:9080/users/homer");
+        ((HttpEntityEnclosingRequestBase)method).setEntity(new StringEntity(MSG_BODY));
+    	
+        HttpResponse response = doExecute(method);
+        
+        assertHttpResponse(response, 200, "text/plain");
     }
-}
+}
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletQueryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletQueryTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletQueryTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletQueryTest.java Tue Feb 23 10:09:58 2010
@@ -19,17 +19,15 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpGet;
 import org.junit.Test;
 
 /**
  *
  * @version $Revision$
  */
-public class RestletQueryTest extends CamelTestSupport {
+public class RestletQueryTest extends RestletTestSupport {
     private static final String QUERY_STRING = "foo=bar&test=123";
 
     @Override
@@ -53,13 +51,8 @@
     
     @Test
     public void testPostBody() throws Exception {
-        HttpMethod method = new GetMethod("http://localhost:9080/users/homer?" + QUERY_STRING);
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(200, client.executeMethod(method));
-        } finally {
-            method.releaseConnection();
-        }
-
+    	HttpResponse response = doExecute(new HttpGet("http://localhost:9080/users/homer?" + QUERY_STRING));
+    	
+    	assertHttpResponse(response, 200, "text/plain");
     }
-}
+}
\ No newline at end of file

Modified: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java (original)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletResponseTest.java Tue Feb 23 10:09:58 2010
@@ -22,17 +22,15 @@
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpMethod;
-import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.http.HttpResponse;
+import org.apache.http.client.methods.HttpPost;
 import org.junit.Test;
 
 /**
  *
  * @version $Revision$
  */
-public class RestletResponseTest extends CamelTestSupport {
+public class RestletResponseTest extends RestletTestSupport {
 
     @Override
     protected RouteBuilder createRouteBuilder() {
@@ -55,15 +53,9 @@
     
     @Test
     public void testCustomResponse() throws Exception {
-        HttpMethod method = new PostMethod("http://localhost:9080/users/homer");
-        try {
-            HttpClient client = new HttpClient();
-            assertEquals(417, client.executeMethod(method));
-            assertTrue(method.getResponseHeader("Content-Type").getValue()
-                    .startsWith("application/JSON"));
-        } finally {
-            method.releaseConnection();
-        }
+    	HttpResponse response = doExecute(new HttpPost("http://localhost:9080/users/homer"));
+    	
+    	assertHttpResponse(response, 417, "application/JSON");
     }
     
     @Test
@@ -73,4 +65,4 @@
         String response = (String)template.requestBodyAndHeaders("restlet:http://localhost:9080/users/{username}?restletMethod=POST", "<request>message</request>", headers);
         assertEquals("The response is wrong ", response, "{homer}");
     }
-}
+}
\ No newline at end of file

Added: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java?rev=915267&view=auto
==============================================================================
--- camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java (added)
+++ camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java Tue Feb 23 10:09:58 2010
@@ -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.component.restlet;
+
+import java.io.IOException;
+
+import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.http.HttpResponse;
+import org.apache.http.ParseException;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.entity.BufferedHttpEntity;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.util.EntityUtils;
+
+/**
+ *
+ * @version $Revision$
+ */
+public abstract class RestletTestSupport extends CamelTestSupport {
+	
+    public HttpResponse doExecute(HttpUriRequest method) throws Exception {
+    	HttpClient client = new DefaultHttpClient();
+        try {
+        	HttpResponse response = client.execute(method);
+        	response.setEntity(new BufferedHttpEntity(response.getEntity()));
+        	return response;
+        } finally {
+        	client.getConnectionManager().shutdown();
+        }
+    }
+    
+    public static void assertHttpResponse(HttpResponse response, int expectedStatusCode, String expectedContentType) throws ParseException, IOException {
+    	assertHttpResponse(response, expectedStatusCode, expectedContentType, null);
+    }
+    
+    public static void assertHttpResponse(HttpResponse response, int expectedStatusCode, String expectedContentType, String expectedBody) throws ParseException, IOException {
+    	assertEquals(expectedStatusCode, response.getStatusLine().getStatusCode());
+    	assertTrue(response.getFirstHeader("Content-Type").getValue().startsWith(expectedContentType));
+    	if (expectedBody != null) {
+    		assertEquals(expectedBody, EntityUtils.toString(response.getEntity()));
+    	}
+    }
+}
\ No newline at end of file

Propchange: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: camel/trunk/components/camel-restlet/src/test/java/org/apache/camel/component/restlet/RestletTestSupport.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: camel/trunk/platforms/karaf/features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/camel/trunk/platforms/karaf/features/src/main/resources/features.xml?rev=915267&r1=915266&r2=915267&view=diff
==============================================================================
--- camel/trunk/platforms/karaf/features/src/main/resources/features.xml (original)
+++ camel/trunk/platforms/karaf/features/src/main/resources/features.xml Tue Feb 23 10:09:58 2010
@@ -362,7 +362,6 @@
     <bundle>mvn:org.apache.camel/camel-restlet/${pom.version}</bundle>
     <bundle>mvn:http://maven.restlet.org!org.restlet/org.restlet/${restlet-version}</bundle>
     <bundle>mvn:http://maven.restlet.org!com.noelios.restlet/com.noelios.restlet/${restlet-version}</bundle>
-    <feature version='${pom.version}'>camel-http</feature>
   </feature>
   <feature name='camel-rmi' version='${pom.version}'>
     <feature version='${pom.version}'>camel-core</feature>