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

orpiske 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 669745e  (chores) Simplified assertions (#4632)
669745e is described below

commit 669745ed8190be22f552a7ef94133a320b5c6d75
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Thu Nov 19 12:42:26 2020 +0100

    (chores) Simplified assertions (#4632)
    
    Components: camel-box, camel-box, camel-cmis, camel-cxf-transport, 
camel-cxf, camel-disruptor
---
 .../box/BoxTasksManagerIntegrationTest.java        |  6 +-
 .../camel/component/cmis/CMISConsumerTest.java     |  7 +-
 .../cxf/common/header/CxfHeaderHelperTest.java     |  2 +-
 .../cxf/common/message/CxfMessageHelperTest.java   |  2 +-
 ...XFWsdlOnlyPayloadModeMultiPartNoSpringTest.java |  3 +-
 .../component/cxf/CxfConsumerResponseTest.java     |  3 +-
 .../camel/component/cxf/DefaultCxfBindingTest.java |  2 +-
 .../component/cxf/jaxrs/CxfRsProducerTest.java     |  3 +-
 .../component/cxf/multipart/CXFMultiPartTest.java  |  6 +-
 .../soap/headers/CxfMessageHeadersRelayTest.java   | 79 ++++++++++------------
 .../component/cxf/util/SplitterWithXqureyTest.java |  3 +-
 .../DisruptorComponentReferenceEndpointTest.java   |  4 +-
 12 files changed, 55 insertions(+), 65 deletions(-)

diff --git 
a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
 
b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
index 991c77e..30bdcf8 100644
--- 
a/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
+++ 
b/components/camel-box/camel-box-component/src/test/java/org/apache/camel/component/box/BoxTasksManagerIntegrationTest.java
@@ -40,7 +40,7 @@ import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
@@ -113,7 +113,7 @@ public class BoxTasksManagerIntegrationTest extends 
AbstractBoxTestSupport {
         requestBody("direct://DELETETASK", testTask.getID());
 
         List<BoxTask.Info> tasks = testFile.getTasks();
-        assertFalse(tasks.size() != 0, "deleteTask task still exists.");
+        assertNotEquals(0, tasks.size(), "deleteTask task still exists.");
     }
 
     @Disabled // Receiving "not found" exception from Box API
@@ -125,7 +125,7 @@ public class BoxTasksManagerIntegrationTest extends 
AbstractBoxTestSupport {
         requestBody("direct://DELETETASKASSIGNMENT", info.getID());
 
         List<BoxTaskAssignment.Info> assignments = testTask.getAssignments();
-        assertFalse(assignments.size() != 0, "deleteTaskAssignment assignment 
still exists.");
+        assertNotEquals(0, assignments.size(), "deleteTaskAssignment 
assignment still exists.");
     }
 
     @Test
diff --git 
a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISConsumerTest.java
 
b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISConsumerTest.java
index 2292084..cad512e 100644
--- 
a/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISConsumerTest.java
+++ 
b/components/camel-cmis/src/test/java/org/apache/camel/component/cmis/CMISConsumerTest.java
@@ -29,6 +29,7 @@ import org.apache.chemistry.opencmis.client.api.Folder;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class CMISConsumerTest extends CMISTestSupport {
@@ -47,9 +48,9 @@ public class CMISConsumerTest extends CMISTestSupport {
         treeBasedConsumer.stop();
 
         List<Exchange> exchanges = resultEndpoint.getExchanges();
-        assertTrue(getNodeNameForIndex(exchanges, 0).equals("RootFolder"));
-        assertTrue(getNodeNameForIndex(exchanges, 1).equals("Folder1"));
-        assertTrue(getNodeNameForIndex(exchanges, 2).equals("Folder2"));
+        assertEquals("RootFolder", getNodeNameForIndex(exchanges, 0));
+        assertEquals("Folder1", getNodeNameForIndex(exchanges, 1));
+        assertEquals("Folder2", getNodeNameForIndex(exchanges, 2));
         assertTrue(getNodeNameForIndex(exchanges, 3).contains(".txt"));
         assertTrue(getNodeNameForIndex(exchanges, 4).contains(".txt"));
     }
diff --git 
a/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/header/CxfHeaderHelperTest.java
 
b/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/header/CxfHeaderHelperTest.java
index faf843c..90060f1 100644
--- 
a/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/header/CxfHeaderHelperTest.java
+++ 
b/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/header/CxfHeaderHelperTest.java
@@ -80,7 +80,7 @@ public class CxfHeaderHelperTest {
         Map<String, List<String>> cxfHeaders
                 = CastUtils.cast((Map<?, ?>) 
cxfMessage.get(org.apache.cxf.message.Message.PROTOCOL_HEADERS));
         assertNotNull(cxfHeaders);
-        assertTrue(cxfHeaders.size() == 7);
+        assertEquals(7, cxfHeaders.size());
 
         verifyHeader(cxfHeaders, "soapaction", "urn:hello:world");
         verifyHeader(cxfHeaders, "SoapAction", "urn:hello:world");
diff --git 
a/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/CxfMessageHelperTest.java
 
b/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/CxfMessageHelperTest.java
index 145d2e6..4753074 100644
--- 
a/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/CxfMessageHelperTest.java
+++ 
b/components/camel-cxf-transport/src/test/java/org/apache/camel/component/cxf/common/message/CxfMessageHelperTest.java
@@ -89,7 +89,7 @@ public class CxfMessageHelperTest {
 
         // verify there is no duplicate
         assertNotNull(headers, "The headers must be present");
-        assertTrue(headers.size() == 1, "There must be one header entry");
+        assertEquals(1, headers.size(), "There must be one header entry");
 
         // verify the soapaction can be retrieved in case-insensitive ways
         verifyHeader(headers, "soapaction", "urn:hello:world");
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest.java
index 0d44bb6..3b19e8f 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CXFWsdlOnlyPayloadModeMultiPartNoSpringTest.java
@@ -34,7 +34,6 @@ import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.TestInstance;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Unit test that verifies multi part SOAP message functionality
@@ -101,7 +100,7 @@ public class CXFWsdlOnlyPayloadModeMultiPartNoSpringTest 
extends CamelTestSuppor
 
         client.getPersonMultiPartOperation("foo", 0, name, ssn);
         assertEquals("New Person Name", name.value);
-        assertTrue(123456789 == ssn.value);
+        assertEquals(123456789, (int) ssn.value);
 
     }
 
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerResponseTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerResponseTest.java
index 31335e9..ebfbfbf 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerResponseTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerResponseTest.java
@@ -37,7 +37,6 @@ import org.junit.jupiter.api.TestInstance;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 @TestInstance(TestInstance.Lifecycle.PER_CLASS)
 public class CxfConsumerResponseTest extends CamelTestSupport {
@@ -128,7 +127,7 @@ public class CxfConsumerResponseTest extends 
CamelTestSupport {
         int beforeCallingPing = pingCounter;
         client.ping();
         int afterCallingPing = pingCounter;
-        assertTrue(afterCallingPing - beforeCallingPing == 1, "The ping 
operation doesn't be called");
+        assertEquals(1, afterCallingPing - beforeCallingPing, "The ping 
operation doesn't be called");
     }
 
 }
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/DefaultCxfBindingTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/DefaultCxfBindingTest.java
index 27a174e..17e159e 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/DefaultCxfBindingTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/DefaultCxfBindingTest.java
@@ -316,7 +316,7 @@ public class DefaultCxfBindingTest {
 
         Map<String, List<String>> headers = CastUtils.cast((Map<?, ?>) 
cxfMessage.get(Message.PROTOCOL_HEADERS));
         assertNotNull(headers);
-        assertTrue(headers.size() == 2);
+        assertEquals(2, headers.size());
 
         verifyHeader(headers, "soapaction", "urn:hello:world");
         verifyHeader(headers, "SoapAction", "urn:hello:world");
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
index 81ceb39..a2a9549 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerTest.java
@@ -44,6 +44,7 @@ import 
org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
@@ -370,7 +371,7 @@ public class CxfRsProducerTest extends 
CamelSpringTestSupport {
         // get the response message 
         Customer response = (Customer) exchange.getMessage().getBody();
         assertNotNull(response, "The response should not be null");
-        assertTrue(response.getId() != 8888, "Get a wrong customer id");
+        assertNotEquals(8888, response.getId(), "Get a wrong customer id");
         assertEquals("Willem", response.getName(), "Get a wrong customer 
name");
         assertEquals(201, 
exchange.getMessage().getHeader(Exchange.HTTP_RESPONSE_CODE), "Get a wrong 
response code");
     }
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/multipart/CXFMultiPartTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/multipart/CXFMultiPartTest.java
index 38da708..6996979 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/multipart/CXFMultiPartTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/multipart/CXFMultiPartTest.java
@@ -36,8 +36,8 @@ import org.junit.jupiter.api.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class CXFMultiPartTest extends CamelTestSupport {
     public static final QName SERVICE_NAME = new QName(
@@ -86,10 +86,10 @@ public class CXFMultiPartTest extends CamelTestSupport {
                                               + 
"/CXFMultiPartTest/CamelContext/RouterPort",
                 "in0", "in1");
         assertNotNull(reply, "No response received from service");
-        assertTrue(reply.equals("in0 in1"));
+        assertEquals("in0 in1", reply);
 
         assertNotNull(reply, "No response received from service");
-        assertTrue(reply.equals("in0 in1"));
+        assertEquals("in0 in1", reply);
 
     }
 
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
index 663a4c4..bd796a9 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/soap/headers/CxfMessageHeadersRelayTest.java
@@ -69,6 +69,7 @@ import 
org.springframework.test.context.junit.jupiter.SpringExtension;
 
 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;
 
@@ -158,7 +159,7 @@ public class CxfMessageHeadersRelayTest {
         InHeader me = new InHeader();
         me.setRequestType("CXF user");
         InHeaderResponse response = proxy.inHeader(me, 
Constants.IN_HEADER_DATA);
-        assertTrue(response.getResponseType().equals("pass"), "Expected in 
band header to propagate but it didn't");
+        assertEquals("pass", response.getResponseType(), "Expected in band 
header to propagate but it didn't");
     }
 
     @Test
@@ -176,7 +177,7 @@ public class CxfMessageHeadersRelayTest {
         Holder<OutHeaderResponse> result = new Holder<>(new 
OutHeaderResponse());
         Holder<SOAPHeaderData> header = new Holder<>(new SOAPHeaderData());
         proxy.outHeader(me, result, header);
-        assertTrue(result.value.getResponseType().equals("pass"), "Expected in 
band header to propagate but it didn't");
+        assertEquals("pass", result.value.getResponseType(), "Expected in band 
header to propagate but it didn't");
         assertTrue(Constants.equals(Constants.OUT_HEADER_DATA, header.value),
                 "Expected in band response header to propagate but it either 
didn't "
                                                                               
+ " or its contents do not match");
@@ -195,7 +196,7 @@ public class CxfMessageHeadersRelayTest {
         me.setRequestType("CXF user");
         Holder<SOAPHeaderData> header = new 
Holder<>(Constants.IN_OUT_REQUEST_HEADER_DATA);
         InoutHeaderResponse result = proxy.inoutHeader(me, header);
-        assertTrue(result.getResponseType().equals("pass"), "Expected in band 
header to propagate but it didn't");
+        assertEquals("pass", result.getResponseType(), "Expected in band 
header to propagate but it didn't");
         assertTrue(Constants.equals(Constants.IN_OUT_RESPONSE_HEADER_DATA, 
header.value),
                 "Expected in band response header to propagate but it either 
didn't "
                                                                                
           + " or its contents do not match");
@@ -216,8 +217,7 @@ public class CxfMessageHeadersRelayTest {
         me.setLastName("Doh");
 
         Me response = proxy.inOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the out of band header to propagate but it didn't");
+        assertEquals("pass", response.getFirstName(), "Expected the out of 
band header to propagate but it didn't");
     }
 
     @Test
@@ -234,8 +234,7 @@ public class CxfMessageHeadersRelayTest {
         me.setFirstName("john");
         me.setLastName("Doh");
         Me response = proxy.inoutOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the out of band header to propagate but it didn't");
+        assertEquals("pass", response.getFirstName(), "Expected the out of 
band header to propagate but it didn't");
         validateReturnedOutOfBandHeader(proxy);
     }
 
@@ -253,8 +252,7 @@ public class CxfMessageHeadersRelayTest {
         me.setFirstName("john");
         me.setLastName("Doh");
         Me response = proxy.inoutOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the out of band header to propagate but it didn't");
+        assertEquals("pass", response.getFirstName(), "Expected the out of 
band header to propagate but it didn't");
 
         InvocationHandler handler = Proxy.getInvocationHandler(proxy);
         BindingProvider bp = null;
@@ -280,8 +278,7 @@ public class CxfMessageHeadersRelayTest {
         me.setFirstName("john");
         me.setLastName("Doh");
         Me response = proxy.outOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the out of band header to propagate but it didn't");
+        assertEquals("pass", response.getFirstName(), "Expected the out of 
band header to propagate but it didn't");
         validateReturnedOutOfBandHeader(proxy);
     }
 
@@ -301,8 +298,7 @@ public class CxfMessageHeadersRelayTest {
         me.setFirstName("john");
         me.setLastName("Doh");
         Me response = proxy.inOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the in out of band header *not* to propagate but it 
did");
+        assertEquals("pass", response.getFirstName(), "Expected the in out of 
band header *not* to propagate but it did");
 
     }
 
@@ -321,8 +317,7 @@ public class CxfMessageHeadersRelayTest {
         me.setLastName("Doh");
         Thread.sleep(5000);
         Me response = proxy.outOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the out out of band header *not* to propagate but it 
did");
+        assertEquals("pass", response.getFirstName(), "Expected the out out of 
band header *not* to propagate but it did");
         validateReturnedOutOfBandHeader(proxy, false);
     }
 
@@ -340,8 +335,7 @@ public class CxfMessageHeadersRelayTest {
         me.setFirstName("john");
         me.setLastName("Doh");
         Me response = proxy.inoutOutOfBandHeader(me);
-        assertTrue(response.getFirstName().equals("pass"),
-                "Expected the in out of band header to *not* propagate but it 
did");
+        assertEquals("pass", response.getFirstName(), "Expected the in out of 
band header to *not* propagate but it did");
         validateReturnedOutOfBandHeader(proxy, false);
     }
 
@@ -362,7 +356,7 @@ public class CxfMessageHeadersRelayTest {
         } catch (Exception e) {
             // do nothing
         }
-        assertTrue(response.getResponseType().equals("pass"), "Expected in in 
band header *not* to propagate but it did");
+        assertEquals("pass", response.getResponseType(), "Expected in in band 
header *not* to propagate but it did");
     }
 
     @Test
@@ -385,9 +379,9 @@ public class CxfMessageHeadersRelayTest {
         } catch (Exception e) {
             // do nothing
         }
-        assertTrue(result.value.getResponseType().equals("pass"),
+        assertEquals("pass", result.value.getResponseType(),
                 "Ultimate remote HeaderTester.outHeader() destination was not 
reached");
-        assertTrue(header.value == null, "Expected in band response header 
*not* to propagate but it did");
+        assertNull(header.value, "Expected in band response header *not* to 
propagate but it did");
     }
 
     @Test
@@ -408,8 +402,8 @@ public class CxfMessageHeadersRelayTest {
         } catch (Exception e) {
             // do nothing
         }
-        assertTrue(result.getResponseType().equals("pass"), "Expected in band 
out header *not* to propagate but it did");
-        assertTrue(header.value == null, "Expected in band response header 
*not* to propagate but did");
+        assertEquals("pass", result.getResponseType(), "Expected in band out 
header *not* to propagate but it did");
+        assertNull(header.value, "Expected in band response header *not* to 
propagate but did");
     }
 
     @Test
@@ -613,8 +607,7 @@ public class CxfMessageHeadersRelayTest {
             fail("Should have got List of out-of-band headers");
         }
 
-        assertTrue(oobHdr.size() == 1,
-                "HeaderHolder list expected to conain 1 object received " + 
oobHdr.size());
+        assertEquals(1, oobHdr.size(), "HeaderHolder list expected to conain 1 
object received " + oobHdr.size());
 
         for (Header hdr1 : oobHdr) {
             if (hdr1.getObject() instanceof Node) {
@@ -630,13 +623,13 @@ public class CxfMessageHeadersRelayTest {
         }
 
         assertNotNull(hdrToTest, "out-of-band header should not be null");
-        assertTrue("testOobReturnHeaderName".equals(hdrToTest.getName()),
+        assertEquals("testOobReturnHeaderName", hdrToTest.getName(),
                 "Expected out-of-band Header name testOobReturnHeaderName 
recevied :"
-                                                                          + 
hdrToTest.getName());
-        assertTrue("testOobReturnHeaderValue".equals(hdrToTest.getValue()),
+                                                                     + 
hdrToTest.getName());
+        assertEquals("testOobReturnHeaderValue", hdrToTest.getValue(),
                 "Expected out-of-band Header value testOobReturnHeaderValue 
recevied :"
-                                                                            + 
hdrToTest.getValue());
-        
assertTrue("testReturnHdrAttribute".equals(hdrToTest.getHdrAttribute()),
+                                                                       + 
hdrToTest.getValue());
+        assertEquals("testReturnHdrAttribute", hdrToTest.getHdrAttribute(),
                 "Expected out-of-band Header attribute testReturnHdrAttribute 
recevied :" + hdrToTest.getHdrAttribute());
     }
 
@@ -671,7 +664,7 @@ public class CxfMessageHeadersRelayTest {
             fail("Should have got List of out-of-band headers");
         }
 
-        assertTrue(oobHdr.size() == 2, "HeaderHolder list expected to conain 2 
object received " + oobHdr.size());
+        assertEquals(2, oobHdr.size(), "HeaderHolder list expected to conain 2 
object received " + oobHdr.size());
 
         for (Header hdr1 : oobHdr) {
             if (hdr1.getObject() instanceof Node) {
@@ -687,27 +680,25 @@ public class CxfMessageHeadersRelayTest {
         }
 
         assertTrue(hdrToTest.size() > 0, "out-of-band header should not be 
null");
-        
assertTrue("testOobReturnHeaderName".equals(hdrToTest.get(0).getName()),
+        assertEquals("testOobReturnHeaderName", hdrToTest.get(0).getName(),
                 "Expected out-of-band Header name testOobReturnHeaderName 
recevied :"
-                                                                               
  + hdrToTest.get(0).getName());
-        
assertTrue("testOobReturnHeaderValue".equals(hdrToTest.get(0).getValue()),
+                                                                            + 
hdrToTest.get(0).getName());
+        assertEquals("testOobReturnHeaderValue", hdrToTest.get(0).getValue(),
                 "Expected out-of-band Header value testOobReturnHeaderValue 
recevied :"
-                                                                               
    + hdrToTest.get(0).getValue());
-        assertTrue("testReturnHdrAttribute"
-                .equals(hdrToTest.get(0).getHdrAttribute()),
+                                                                              
+ hdrToTest.get(0).getValue());
+        assertEquals("testReturnHdrAttribute", 
hdrToTest.get(0).getHdrAttribute(),
                 "Expected out-of-band Header attribute testReturnHdrAttribute 
recevied :"
-                                                             + 
hdrToTest.get(0).getHdrAttribute());
+                                                                               
    + hdrToTest.get(0).getHdrAttribute());
 
-        assertTrue("New_testOobHeader".equals(hdrToTest.get(1).getName()),
+        assertEquals("New_testOobHeader", hdrToTest.get(1).getName(),
                 "Expected out-of-band Header name New_testOobHeader recevied :"
-                                                                           + 
hdrToTest.get(1).getName());
-        
assertTrue("New_testOobHeaderValue".equals(hdrToTest.get(1).getValue()),
+                                                                      + 
hdrToTest.get(1).getName());
+        assertEquals("New_testOobHeaderValue", hdrToTest.get(1).getValue(),
                 "Expected out-of-band Header value New_testOobHeaderValue 
recevied :"
-                                                                               
  + hdrToTest.get(1).getValue());
-        assertTrue("testHdrAttribute"
-                .equals(hdrToTest.get(1).getHdrAttribute()),
+                                                                            + 
hdrToTest.get(1).getValue());
+        assertEquals("testHdrAttribute", hdrToTest.get(1).getHdrAttribute(),
                 "Expected out-of-band Header attribute testHdrAttribute 
recevied :"
-                                                             + 
hdrToTest.get(1).getHdrAttribute());
+                                                                             + 
hdrToTest.get(1).getHdrAttribute());
     }
 
     public static class InsertRequestOutHeaderProcessor implements Processor {
diff --git 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
index b0debd3..90677d6 100644
--- 
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
+++ 
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/SplitterWithXqureyTest.java
@@ -29,7 +29,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class SplitterWithXqureyTest extends CamelTestSupport {
 
@@ -82,7 +81,7 @@ public class SplitterWithXqureyTest extends CamelTestSupport {
             Element element = (Element) exchange.getIn().getBody();
             String message = CxfUtilsTestHelper.elementToString(element);
             LOG.info("The splited message is " + message);
-            assertTrue(message.indexOf("<other") == 0, "The splitted message 
should start with <other");
+            assertEquals(0, message.indexOf("<other"), "The splitted message 
should start with <other");
             assertEquals(verifyStrings[i], message, "Get a wrong message");
             i++;
         }
diff --git 
a/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorComponentReferenceEndpointTest.java
 
b/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorComponentReferenceEndpointTest.java
index 077ee12..33e7e59 100644
--- 
a/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorComponentReferenceEndpointTest.java
+++ 
b/components/camel-disruptor/src/test/java/org/apache/camel/component/disruptor/DisruptorComponentReferenceEndpointTest.java
@@ -23,7 +23,7 @@ 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.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 /**
  *
@@ -60,7 +60,7 @@ public class DisruptorComponentReferenceEndpointTest extends 
CamelTestSupport {
         context.removeRoute("foo2");
 
         // and there is no longer disruptors for the foo key
-        assertTrue(disruptor.getDisruptors().get(fooKey) == null);
+        assertNull(disruptor.getDisruptors().get(fooKey));
 
         // there should still be a bar
         assertEquals(1, numberOfReferences(disruptor));

Reply via email to