[camel] branch CAMEL-13826 updated (b286d3d -> 72bc921)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch CAMEL-13826 updated (b286d3d -> 72bc921)

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

aldettinger pushed a change to branch CAMEL-13826
in repository https://gitbox.apache.org/repos/asf/camel.git.


 discard b286d3d  CAMEL-13826: Migrated camel-ahc tests to camel-test-junit5
     new 72bc921  CAMEL-13826: Migrated camel-ahc tests to camel-test-junit5

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b286d3d)
            \
             N -- N -- N   refs/heads/CAMEL-13826 (72bc921)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 components/camel-test-junit5/src/main/docs/test-junit5.adoc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Reply | Threaded
Open this post in threaded view
|

[camel] 01/01: CAMEL-13826: Migrated camel-ahc tests to camel-test-junit5

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

aldettinger pushed a commit to branch CAMEL-13826
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 72bc92196333dc47e221b47b84a56a6214b2412f
Author: aldettinger <[hidden email]>
AuthorDate: Tue Aug 13 16:09:14 2019 +0200

    CAMEL-13826: Migrated camel-ahc tests to camel-test-junit5
---
 components/camel-ahc/pom.xml                       |  7 +++--
 .../ahc/AhcBridgeEndpointPathWithSpacesTest.java   |  6 +++--
 .../camel/component/ahc/AhcBridgeEndpointTest.java | 12 ++++++---
 .../component/ahc/AhcClientConfigRealmUriTest.java |  4 ++-
 .../component/ahc/AhcClientConfigUriTest.java      |  4 ++-
 .../ahc/AhcComponentClientConfigTest.java          |  2 +-
 ...entConfigWithClientConfigUriParametersTest.java |  5 +++-
 .../ahc/AhcComponentCustomClientConfigTest.java    |  2 +-
 .../ahc/AhcComponentNettyClientConfigTest.java     |  2 +-
 .../apache/camel/component/ahc/AhcGoogleTest.java  |  8 +++---
 .../ahc/AhcOperationFailedExceptionTest.java       |  4 +--
 .../camel/component/ahc/AhcProduce500Test.java     |  7 ++++-
 .../component/ahc/AhcProduceClientConfigTest.java  |  2 +-
 ...entConfigWithClientConfigUriParametersTest.java |  5 +++-
 .../component/ahc/AhcProduceGetHeadersTest.java    |  2 +-
 .../ahc/AhcProduceGetNoSlashInUriTest.java         |  2 +-
 .../camel/component/ahc/AhcProduceGetTest.java     |  4 ++-
 .../AhcProduceNoThrowExceptionOnFailureTest.java   |  2 +-
 .../component/ahc/AhcProducePostDoWhileTest.java   |  2 +-
 .../component/ahc/AhcProducePostHeadersTest.java   |  2 +-
 .../camel/component/ahc/AhcProducePostTest.java    |  4 ++-
 .../ahc/AhcProduceTransferExceptionTest.java       |  7 ++++-
 ...hcProduceWithClientConfigUriParametersTest.java |  2 +-
 .../ahc/AhcProducerConnectionCloseHeadersTest.java |  2 +-
 .../component/ahc/AhcProducerSessionTest.java      |  2 +-
 .../AhcProducerTwoParametersWithSameKeyTest.java   | 10 ++++---
 .../apache/camel/component/ahc/BaseAhcTest.java    |  6 ++---
 .../camel/component/ahc/HttpEndpointURLTest.java   |  6 +++--
 .../ahc/HttpHeaderFilterStrategyTest.java          | 11 +++++---
 .../ahc/javabody/AhcProduceJavaBodyTest.java       |  8 +++++-
 .../src/main/docs/test-junit5.adoc                 | 31 ++++++++++++++++++++++
 31 files changed, 124 insertions(+), 49 deletions(-)

diff --git a/components/camel-ahc/pom.xml b/components/camel-ahc/pom.xml
index 8395944..18d4d9b 100644
--- a/components/camel-ahc/pom.xml
+++ b/components/camel-ahc/pom.xml
@@ -65,7 +65,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -78,10 +78,9 @@
             <artifactId>camel-jetty</artifactId>
             <scope>test</scope>
         </dependency>
-
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>java-hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
index a71ddf6..ac4bcde 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
@@ -21,7 +21,9 @@ import java.io.ByteArrayInputStream;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcBridgeEndpointPathWithSpacesTest extends BaseAhcTest {
 
@@ -32,7 +34,7 @@ public class AhcBridgeEndpointPathWithSpacesTest extends BaseAhcTest {
     public void testBridgeEndpoint() throws Exception {
         String response = template.requestBodyAndHeader("http://localhost:" + port1 + "/test bar/hello",
                 new ByteArrayInputStream("This is a test".getBytes()), "Content-Type", "application/xml", String.class);
-        assertEquals("Get a wrong response", "/proxy%20bar/hello", response);
+        assertEquals("/proxy%20bar/hello", response, "Get a wrong response");
     }
 
     @Override
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
index 920d0ae..0a15b63 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
@@ -22,7 +22,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class AhcBridgeEndpointTest extends BaseAhcTest {
 
@@ -33,16 +37,16 @@ public class AhcBridgeEndpointTest extends BaseAhcTest {
     public void testBridgeEndpoint() throws Exception {
         String response = template.requestBodyAndHeader("http://localhost:" + port1 + "/test/hello",
                 new ByteArrayInputStream("This is a test".getBytes()), "Content-Type", "application/xml", String.class);
-        assertEquals("Get a wrong response", "/", response);
+        assertEquals("/", response, "Get a wrong response");
 
         response = template.requestBody("http://localhost:" + port2 + "/hello/world", "hello", String.class);
-        assertEquals("Get a wrong response", "/hello/world", response);
+        assertEquals("/hello/world", response, "Get a wrong response");
 
         try {
             template.requestBody("http://localhost:" + port1 + "/hello/world", "hello", String.class);
             fail("Expect exception here!");
         } catch (Exception ex) {
-            assertTrue("We should get a RuntimeCamelException", ex instanceof RuntimeCamelException);
+            assertTrue(ex instanceof RuntimeCamelException, "We should get a RuntimeCamelException");
         }
     }
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
index 0f44664..dce95e0 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
@@ -17,7 +17,9 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcClientConfigRealmUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
index 835acee..9b29667 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
@@ -17,7 +17,9 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcClientConfigUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
index 35a3311..6664ada 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
index 2e827b7..50c7b4d 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
@@ -17,7 +17,10 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.Endpoint;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class AhcComponentClientConfigWithClientConfigUriParametersTest extends AhcComponentClientConfigTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
index 7e1d518..3ebba9f 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentCustomClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
index 94c0681..33f370a 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentNettyClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
index 3c71f5b..f7cb93c 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
@@ -17,14 +17,14 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 /**
  * Requires online internet connection for testing.
  */
-@Ignore("Run this test manual as it requires online internet")
+@Disabled("Run this test manual as it requires online internet")
 public class AhcGoogleTest extends CamelTestSupport {
 
     @Test
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
index 0ad335d..5a58d41 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.ahc;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsNot.not;
 import static org.hamcrest.core.StringContains.containsString;
-import static org.junit.Assert.assertThat;
 
 public class AhcOperationFailedExceptionTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
index 1843822..42bf0e7 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
@@ -20,7 +20,12 @@ import org.apache.camel.CamelExecutionException;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class AhcProduce500Test extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
index 0416a7d..b30a684 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
index 0b023d7..9058c8d 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
@@ -17,7 +17,10 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.Endpoint;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class AhcProduceClientConfigWithClientConfigUriParametersTest extends AhcProduceClientConfigTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
index f053f45..72029d3 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceGetHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
index 682b8f6..bcee6b4 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
@@ -17,7 +17,7 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceGetNoSlashInUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
index 1e53506..0075202 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
@@ -18,7 +18,9 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcProduceGetTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
index 99c1bca..ce6aaa8 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceNoThrowExceptionOnFailureTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
index a32275f..87d8307 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducePostDoWhileTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
index 40fff12..734fb50 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducePostHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
index d34f645..d2767e5 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
@@ -18,7 +18,9 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcProducePostTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
index 4e2076b..c8b3305 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
@@ -18,7 +18,12 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class AhcProduceTransferExceptionTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
index da1ba0a..fed7ab3 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceWithClientConfigUriParametersTest extends BaseAhcTest {
     @Test
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
index 34ade6e..cc37cee 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducerConnectionCloseHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
index 1707957..d39becb 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
@@ -28,7 +28,7 @@ import org.apache.camel.http.common.cookie.ExchangeCookieHandler;
 import org.apache.camel.http.common.cookie.InstanceCookieHandler;
 import org.asynchttpclient.AsyncHttpClientConfig;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducerSessionTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
index d3edca1..a4e891b 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
@@ -22,7 +22,11 @@ import java.util.List;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  *
@@ -34,7 +38,7 @@ public class AhcProducerTwoParametersWithSameKeyTest extends BaseAhcTest {
         Exchange out = template.request("ahc:http://localhost:{{port}}/myapp?from=me&to=foo&to=bar", null);
 
         assertNotNull(out);
-        assertFalse("Should not fail", out.isFailed());
+        assertFalse(out.isFailed(), "Should not fail");
         assertEquals("OK", out.getOut().getBody(String.class));
         assertEquals("yes", out.getOut().getHeader("bar"));
     }
@@ -53,7 +57,7 @@ public class AhcProducerTwoParametersWithSameKeyTest extends BaseAhcTest {
         });
 
         assertNotNull(out);
-        assertFalse("Should not fail", out.isFailed());
+        assertFalse(out.isFailed(), "Should not fail");
         assertEquals("OK", out.getOut().getBody(String.class));
         assertEquals("yes", out.getOut().getHeader("bar"));
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
index 791d620..54d7b74 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
@@ -27,8 +27,8 @@ import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.jsse.SSLContextServerParameters;
 import org.apache.camel.support.jsse.TrustManagersParameters;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.BeforeClass;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeAll;
 
 public abstract class BaseAhcTest extends CamelTestSupport {
 
@@ -36,7 +36,7 @@ public abstract class BaseAhcTest extends CamelTestSupport {
 
     private static volatile int port;
 
-    @BeforeClass
+    @BeforeAll
     public static void initPort() throws Exception {
         port = AvailablePortFinder.getNextAvailable(24000);
     }
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
index 108e281..dcea426 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
@@ -16,8 +16,10 @@
  */
 package org.apache.camel.component.ahc;
 
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class HttpEndpointURLTest extends CamelTestSupport {
     
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
index 6b198c3..8447415 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
@@ -19,9 +19,12 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class HttpHeaderFilterStrategyTest extends CamelTestSupport {
 
@@ -29,7 +32,7 @@ public class HttpHeaderFilterStrategyTest extends CamelTestSupport {
     private Exchange exchange;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() {
         filter = new HttpHeaderFilterStrategy();
         exchange = new DefaultExchange(new DefaultCamelContext());
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
index 4f3804a..77bc296 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
@@ -24,7 +24,13 @@ import org.apache.camel.component.ahc.AhcConstants;
 import org.apache.camel.component.ahc.BaseAhcTest;
 import org.apache.camel.component.jetty.JettyHttpComponent;
 import org.apache.camel.http.common.HttpCommonComponent;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  *
diff --git a/components/camel-test-junit5/src/main/docs/test-junit5.adoc b/components/camel-test-junit5/src/main/docs/test-junit5.adoc
index 6624d90..d9a4d5c 100644
--- a/components/camel-test-junit5/src/main/docs/test-junit5.adoc
+++ b/components/camel-test-junit5/src/main/docs/test-junit5.adoc
@@ -44,3 +44,34 @@ public class SimpleMockTest extends CamelTestSupport {
 }
 ----
 
+== Migrating Camel Tests from JUnit 4 to JUnit 5
+Find below some hints to help in migrating camel tests from JUnit 4 to JUnit 5.
+
+=== Referencing the Camel Test JUnit5 library in your project
+Projects using `camel-test` would need to use `camel-test-junit5`. For instance, maven users would update their pom.xml file as below:
+----
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-test-junit5</artifactId>
+  <scope>test</scope>
+</dependency>
+----
+
+=== Typical migration steps linked to JUnit 5 support in Camel Test
+* Imports of `org.apache.camel.test.junit4.\*` should be replaced with `org.apache.camel.test.junit5.*`
+* `TestSupport` static methods should be imported where needed, for instance `import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf`
+
+=== Typical migration steps linked to JUnit 5 itself
+Once Camel related steps have been performed, there are still typical JUnit 5 migration steps to remember:
+
+* New JUnit 5 assertions should be imported where needed, for instance `import static org.junit.jupiter.api.Assertions.assertEquals`
+* Assertion messages should be moved to the last parameter where needed, for instance `assertEquals("message", 2, 1)` becomes `assertEquals(2, 1, "message")`
+* `org.junit.Test` should be changed in favor of `org.junit.jupiter.api.Test`
+* `org.junit.Ignore` should be changed in favor of `org.junit.jupiter.api.Disabled`
+* `org.junit.Before` should be changed in favor of `org.junit.jupiter.api.BeforeEach`
+* `org.junit.After` should be changed in favor of `org.junit.jupiter.api.AfterEach`
+* `org.junit.BeforeClass` should be changed in favor of `import org.junit.jupiter.api.BeforeAll`
+* `org.junit.AfterClass` should be changed in favor of `import org.junit.jupiter.api.AfterAll`
+* Built-in `assertThat` from third-party assertion libraries should be used. For instance, use `org.hamcrest.MatcherAssert.assertThat` from `java-hamcrest`
+
+Depending on the context, more involved tips might be needed, please check the https://junit.org/junit5/docs/current/user-guide/[JUnit 5 User Guide] then.
\ No newline at end of file