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/13 15:15:50 UTC

[camel] branch master updated: Camel-AWS2-SQS: Migrated tests to Junit5

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.git


The following commit(s) were added to refs/heads/master by this push:
     new 2227088  Camel-AWS2-SQS: Migrated tests to Junit5
2227088 is described below

commit 2227088cf9255741255db6cd0cedd3ee84234eb8
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 13 16:15:09 2020 +0100

    Camel-AWS2-SQS: Migrated tests to Junit5
---
 components/camel-aws2-sqs/pom.xml                  | 24 ++++--
 .../component/aws2/sqs/SqsBatchConsumerTest.java   |  4 +-
 .../aws2/sqs/SqsComponentClientRegistryTest.java   | 13 +++-
 .../aws2/sqs/SqsComponentConfigurationTest.java    | 28 +++++--
 .../component/aws2/sqs/SqsComponentSpringTest.java |  7 +-
 .../camel/component/aws2/sqs/SqsComponentTest.java |  7 +-
 .../sqs/SqsComponentVerifierExtensionTest.java     | 11 +--
 .../aws2/sqs/SqsConcurrentConsumerTest.java        | 90 ----------------------
 .../component/aws2/sqs/SqsConfigurationTest.java   | 48 ------------
 .../aws2/sqs/SqsConsumerIdleMessageTest.java       |  5 +-
 .../sqs/SqsDoesNotExtendMessageVisibilityTest.java |  8 +-
 .../aws2/sqs/SqsEndpointExplicitQueueUrlTest.java  | 48 ------------
 .../component/aws2/sqs/SqsProducerBatchTest.java   |  6 +-
 .../component/aws2/sqs/SqsProducerDeleteTest.java  |  6 +-
 .../aws2/sqs/SqsProducerListQueuesTest.java        |  7 +-
 .../integration/SqsComponentIntegrationTest.java   | 11 ++-
 .../SqsConsumerMessageIntegrationTest.java         |  9 ++-
 .../SqsProducerBatchSendFifoIntegrationTest.java   |  8 +-
 .../SqsProducerBatchSendIntegrationTest.java       |  9 ++-
 .../SqsProducerDeleteMessageIntegrationTest.java   |  8 +-
 20 files changed, 110 insertions(+), 247 deletions(-)

diff --git a/components/camel-aws2-sqs/pom.xml b/components/camel-aws2-sqs/pom.xml
index 09345ca..b0b2296 100644
--- a/components/camel-aws2-sqs/pom.xml
+++ b/components/camel-aws2-sqs/pom.xml
@@ -53,13 +53,8 @@
 
         <!-- for testing -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -78,8 +73,23 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-api</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <artifactId>mockito-junit-jupiter</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java
index c3a4d34..b478e3d 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsBatchConsumerTest.java
@@ -21,8 +21,8 @@ import org.apache.camel.EndpointInject;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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 software.amazon.awssdk.services.sqs.model.Message;
 
 public class SqsBatchConsumerTest extends CamelTestSupport {
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
index cf33f01..8189128 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentClientRegistryTest.java
@@ -16,8 +16,11 @@
  */
 package org.apache.camel.component.aws2.sqs;
 
-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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class SqsComponentClientRegistryTest extends CamelTestSupport {
 
@@ -32,10 +35,12 @@ public class SqsComponentClientRegistryTest extends CamelTestSupport {
         assertNotNull(endpoint.getConfiguration().getAmazonSQSClient());
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void createEndpointWithMinimalSQSClientMisconfiguration() throws Exception {
 
         Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class);
-        Sqs2Endpoint endpoint = (Sqs2Endpoint)component.createEndpoint("aws2-sqs://MyQueue");
+        assertThrows(IllegalArgumentException.class, () -> {
+            Sqs2Endpoint endpoint = (Sqs2Endpoint)component.createEndpoint("aws2-sqs://MyQueue");
+        });
     }
 }
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java
index 131baab..09a3a28 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentConfigurationTest.java
@@ -16,11 +16,17 @@
  */
 package org.apache.camel.component.aws2.sqs;
 
-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 software.amazon.awssdk.core.Protocol;
 import software.amazon.awssdk.regions.Region;
 
+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.assertSame;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 public class SqsComponentConfigurationTest extends CamelTestSupport {
 
     @Test
@@ -191,24 +197,30 @@ public class SqsComponentConfigurationTest extends CamelTestSupport {
         assertEquals(50, consumer.getMaxMessagesPerPoll());
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void createEndpointWithoutAccessKeyConfiguration() throws Exception {
         Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class);
-        component.createEndpoint("aws2-sqs://MyQueue?secretKey=yyy");
+        assertThrows(IllegalArgumentException.class, () -> {
+            component.createEndpoint("aws2-sqs://MyQueue?secretKey=yyy");
+        });
     }
 
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void createEndpointWithoutSecretKeyConfiguration() throws Exception {
         Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class);
-        component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx");
+        assertThrows(IllegalArgumentException.class, () -> {
+            component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx");
+        });
     }
 
     // Setting extendMessageVisibility on an SQS consumer should make
     // visibilityTimeout compulsory
-    @Test(expected = IllegalArgumentException.class)
+    @Test
     public void createEndpointWithExtendMessageVisibilityAndNoVisibilityTimeoutThrowsException() throws Exception {
         Sqs2Component component = context.getComponent("aws2-sqs", Sqs2Component.class);
-        component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx&secretKey=yyy&extendMessageVisibility=true");
+        assertThrows(IllegalArgumentException.class, () -> {
+            component.createEndpoint("aws2-sqs://MyQueue?accessKey=xxx&secretKey=yyy&extendMessageVisibility=true");
+        });
     }
 
     @Test
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java
index b738066..c582d90 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentSpringTest.java
@@ -25,12 +25,15 @@ import org.apache.camel.ExchangePattern;
 import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Test;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import software.amazon.awssdk.services.sqs.model.DeleteMessageResponse;
 import software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
 public class SqsComponentSpringTest extends CamelSpringTestSupport {
 
     @EndpointInject("direct:start")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
index 4a278ab..e50af5a 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
@@ -24,8 +24,11 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class SqsComponentTest extends CamelTestSupport {
 
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java
index 931e903..ffe2f3c 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentVerifierExtensionTest.java
@@ -21,9 +21,10 @@ import java.util.Map;
 
 import org.apache.camel.Component;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Assert;
-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 SqsComponentVerifierExtensionTest extends CamelTestSupport {
 
@@ -49,7 +50,7 @@ public class SqsComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -65,7 +66,7 @@ public class SqsComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
     }
 
 }
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConcurrentConsumerTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConcurrentConsumerTest.java
deleted file mode 100644
index 6ec3dce..0000000
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConcurrentConsumerTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * 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.aws2.sqs;
-
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.camel.BindToRegistry;
-import org.apache.camel.Exchange;
-import org.apache.camel.Processor;
-import org.apache.camel.builder.NotifyBuilder;
-import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-import software.amazon.awssdk.services.sqs.model.Message;
-
-public class SqsConcurrentConsumerTest extends CamelTestSupport {
-    private static final int NUM_CONCURRENT = 10;
-    private static final int NUM_MESSAGES = 100;
-
-    final Set<Long> threadNumbers = new HashSet<>();
-
-    @Test
-    public void consumeMessagesFromQueue() throws Exception {
-        // simple test to make sure that concurrent consumers were used in the
-        // test
-
-        NotifyBuilder notifier = new NotifyBuilder(context).whenCompleted(NUM_MESSAGES).create();
-        assertTrue("We didn't process " + NUM_MESSAGES + " messages as we expected!", notifier.matches(5, TimeUnit.SECONDS));
-
-        if (isPlatform("windows")) {
-            // threading is different on windows
-        } else {
-            // usually we use all threads evenly but sometimes threads are
-            // reused so just test that 50%+ was used
-            if (threadNumbers.size() < (NUM_CONCURRENT / 2)) {
-                fail(String.format("We were expecting to have about half of %d numbers of concurrent consumers, but only found %d", NUM_CONCURRENT, threadNumbers.size()));
-            }
-        }
-    }
-
-    @BindToRegistry("client")
-    public AmazonSQSClientMock addClient() throws Exception {
-        AmazonSQSClientMock client = new AmazonSQSClientMock();
-        createDummyMessages(client, NUM_MESSAGES);
-        return client;
-    }
-
-    private void createDummyMessages(AmazonSQSClientMock client, int numMessages) {
-        for (int counter = 0; counter < numMessages; counter++) {
-            Message.Builder message = Message.builder();
-            message.body("Message " + counter);
-            message.md5OfBody("6a1559560f67c5e7a7d5d838bf0272ee");
-            message.messageId("f6fb6f99-5eb2-4be4-9b15-144774141458");
-            message.receiptHandle("0NNAq8PwvXsyZkR6yu4nQ07FGxNmOBWi5");
-            client.messages.add(message.build());
-        }
-    }
-
-    @Override
-    protected RouteBuilder createRouteBuilder() throws Exception {
-        return new RouteBuilder() {
-            @Override
-            public void configure() throws Exception {
-                from("aws2-sqs://demo?concurrentConsumers=" + NUM_CONCURRENT + "&maxMessagesPerPoll=10&amazonSQSClient=#client").process(new Processor() {
-                    @Override
-                    public void process(Exchange exchange) throws Exception {
-                        threadNumbers.add(Thread.currentThread().getId());
-                    }
-                }).log("processed a new message!");
-            }
-        };
-    }
-
-}
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConfigurationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConfigurationTest.java
deleted file mode 100644
index 4adb4f1..0000000
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConfigurationTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.aws2.sqs;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-public class SqsConfigurationTest {
-
-    @Test
-    public void itReturnsAnInformativeErrorForBadMessageGroupIdStrategy() throws Exception {
-        Sqs2Configuration sqsConfiguration = new Sqs2Configuration();
-        try {
-            sqsConfiguration.setMessageGroupIdStrategy("useUnknownStrategy");
-            fail("Should have thrown exception");
-        } catch (Exception e) {
-            assertTrue("Bad error message: " + e.getMessage(), e.getMessage().startsWith("Unrecognised MessageGroupIdStrategy"));
-        }
-    }
-
-    @Test
-    public void itReturnsAnInformativeErrorForBadMessageDeduplicationIdStrategy() throws Exception {
-        Sqs2Configuration sqsConfiguration = new Sqs2Configuration();
-        try {
-            sqsConfiguration.setMessageDeduplicationIdStrategy("useUnknownStrategy");
-            fail("Should have thrown exception");
-        } catch (Exception e) {
-            assertTrue("Bad error message: " + e.getMessage(), e.getMessage().startsWith("Unrecognised MessageDeduplicationIdStrategy"));
-        }
-    }
-
-}
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java
index 77d29c8..b79d2c9 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsConsumerIdleMessageTest.java
@@ -19,9 +19,10 @@ package org.apache.camel.component.aws2.sqs;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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.assertTrue;
 /**
  * Test to verify that the polling consumer delivers an empty Exchange when the
  * sendEmptyMessageWhenIdle property is set and a polling event yields no
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java
index ae84ed2..9bdae36 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsDoesNotExtendMessageVisibilityTest.java
@@ -22,10 +22,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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 software.amazon.awssdk.services.sqs.model.Message;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class SqsDoesNotExtendMessageVisibilityTest extends CamelTestSupport {
 
     private static final int TIMEOUT = 4; // 4 seconds.
@@ -56,7 +58,7 @@ public class SqsDoesNotExtendMessageVisibilityTest extends CamelTestSupport {
         this.client.messages.add(message.build());
 
         assertMockEndpointsSatisfied(); // Wait for message to arrive.
-        assertTrue("Expected no changeMessageVisibility requests.", this.client.changeMessageVisibilityRequests.size() == 0);
+        assertTrue(this.client.changeMessageVisibilityRequests.size() == 0);
     }
 
     @Override
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsEndpointExplicitQueueUrlTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsEndpointExplicitQueueUrlTest.java
deleted file mode 100644
index dec9870..0000000
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsEndpointExplicitQueueUrlTest.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.aws2.sqs;
-
-import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import software.amazon.awssdk.services.sqs.SqsClient;
-
-public class SqsEndpointExplicitQueueUrlTest extends Assert {
-
-    private static final String QUEUE_URL = "http://localhost:9324/queue/default";
-    private Sqs2Endpoint endpoint;
-    private SqsClient amazonSQSClient;
-
-    @Before
-    public void setUp() {
-        amazonSQSClient = new AmazonSQSClientMock();
-
-        Sqs2Configuration config = new Sqs2Configuration();
-        config.setQueueUrl(QUEUE_URL);
-        config.setAmazonSQSClient(amazonSQSClient);
-
-        endpoint = new Sqs2Endpoint("aws2-sqs://test-queue", new Sqs2Component(new DefaultCamelContext()), config);
-    }
-
-    @Test
-    public void doStartWithExplicitQueueUrlInConfigShouldNotCallSqsClientListQueues() throws Exception {
-        endpoint.doInit();
-
-        assertEquals(endpoint.getQueueUrl(), QUEUE_URL);
-    }
-}
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java
index 3a2cf96..e59c02e 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerBatchTest.java
@@ -26,10 +26,12 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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 software.amazon.awssdk.services.sqs.model.SendMessageBatchResponse;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class SqsProducerBatchTest extends CamelTestSupport {
 
     @BindToRegistry("client")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java
index 16ac8d0..70dc909 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerDeleteTest.java
@@ -23,10 +23,12 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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 software.amazon.awssdk.services.sqs.model.DeleteMessageResponse;
 
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
 public class SqsProducerDeleteTest extends CamelTestSupport {
 
     @BindToRegistry("client")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java
index 69cb198..986bc1e 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerListQueuesTest.java
@@ -23,10 +23,13 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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 software.amazon.awssdk.services.sqs.model.ListQueuesResponse;
 
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class SqsProducerListQueuesTest extends CamelTestSupport {
 
     @BindToRegistry("client")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentIntegrationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentIntegrationTest.java
index 58e150b..9545e1b 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentIntegrationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsComponentIntegrationTest.java
@@ -24,11 +24,14 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.aws2.sqs.Sqs2Constants;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
 
-@Ignore("Must be manually tested. Provide your own accessKey and secretKey!")
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+@Disabled("Must be manually tested. Provide your own accessKey and secretKey!")
 public class SqsComponentIntegrationTest extends CamelTestSupport {
 
     private String accessKey = "xxx";
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageIntegrationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageIntegrationTest.java
index 94cc265..1ea3260 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageIntegrationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsConsumerMessageIntegrationTest.java
@@ -23,11 +23,12 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
 
-@Ignore("Must be manually tested. Provide your own accessKey and secretKey!")
+
+@Disabled("Must be manually tested. Provide your own accessKey and secretKey!")
 public class SqsConsumerMessageIntegrationTest extends CamelTestSupport {
 
     @EndpointInject("direct:start")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoIntegrationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoIntegrationTest.java
index bfee1e8..04ebf63 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoIntegrationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendFifoIntegrationTest.java
@@ -27,11 +27,11 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.aws2.sqs.Sqs2Constants;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
 
-@Ignore("Must be manually tested. Provide your own accessKey and secretKey!")
+@Disabled("Must be manually tested. Provide your own accessKey and secretKey!")
 public class SqsProducerBatchSendFifoIntegrationTest extends CamelTestSupport {
 
     @EndpointInject("direct:start")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendIntegrationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendIntegrationTest.java
index 2ceaab3..57d94c0 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendIntegrationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerBatchSendIntegrationTest.java
@@ -27,11 +27,12 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.aws2.sqs.Sqs2Constants;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
 
-@Ignore("Must be manually tested. Provide your own accessKey and secretKey!")
+
+@Disabled("Must be manually tested. Provide your own accessKey and secretKey!")
 public class SqsProducerBatchSendIntegrationTest extends CamelTestSupport {
 
     @EndpointInject("direct:start")
diff --git a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageIntegrationTest.java b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageIntegrationTest.java
index 6ccb1a1..14b1b61 100644
--- a/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageIntegrationTest.java
+++ b/components/camel-aws2-sqs/src/test/java/org/apache/camel/component/aws2/sqs/integration/SqsProducerDeleteMessageIntegrationTest.java
@@ -23,11 +23,11 @@ import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-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;
 
-@Ignore("Must be manually tested. Provide your own accessKey and secretKey!")
+@Disabled("Must be manually tested. Provide your own accessKey and secretKey!")
 public class SqsProducerDeleteMessageIntegrationTest extends CamelTestSupport {
 
     @EndpointInject("direct:start")