You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/07/22 16:59:06 UTC

[camel] branch master updated (b21991b -> 50a7742)

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

gnodet pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from b21991b  [CAMEL-15328]Honor Optional http headers as method parameters to be null in camel-cxfrs producer
     new ef027fb  [CAMEL-11807] Upgrade camel-salesforce to junit5
     new 11bbdda  [CAMEL-11807] Upgrade camel-resteasy to junit5
     new 831414d  [CAMEL-11807] Upgrade camel-leveldb to junit5
     new 9554125  [CAMEL-11807] Upgrade camel-lra to junit5
     new d4e4fee  [CAMEL-11807] Upgrade camel-reactive-executor-vertx to junit5
     new 967c507  [CAMEL-11807] Upgrade camel-reactor to junit5
     new 6241663  [CAMEL-11807] Upgrade camel-servicenow to junit5
     new d2bbbd2  [CAMEL-11807] Upgrade camel-spring-security to junit5
     new 8b5e99d  [CAMEL-11807] Upgrade camel-shiro to junit5
     new b62f2d1  [CAMEL-11807] Upgrade camel-openapi-java to junit5
     new be6d4e8  [CAMEL-11807] Upgrade camel-velocity to junit5
     new 3e77be6  [CAMEL-11807] Upgrade camel-xslt-saxon to junit5
     new 6b15efd  [CAMEL-11807] Upgrade camel-schematron to junit5
     new a594384  [CAMEL-11807] Upgrade camel-sip to junit5
     new d9f66f8  [CAMEL-11807] Upgrade camel-slack to junit5
     new e896b25  [CAMEL-11807] Upgrade camel-snakeyaml to junit5
     new 55b6f6d  [CAMEL-11807] Upgrade camel-smpp to junit5
     new 50a7742  [CAMEL-11807] Remove unwanted files

The 18 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-leveldb/pom.xml                   |   6 +-
 ...elDBAggregateConcurrentDifferentGroupsTest.java |  10 +-
 .../LevelDBAggregateConcurrentSameGroupTest.java   |  10 +-
 .../LevelDBAggregateDiscardOnTimeoutTest.java      |  10 +-
 .../LevelDBAggregateForceCompletionHeaderTest.java |  10 +-
 .../LevelDBAggregateLoadAndRecoverTest.java        |  16 +-
 .../LevelDBAggregateLoadConcurrentTest.java        |  10 +-
 .../leveldb/LevelDBAggregateLoadTest.java          |  10 +-
 ...DBAggregateNotLostRemovedWhenConfirmedTest.java |  10 +-
 .../leveldb/LevelDBAggregateNotLostTest.java       |  11 +-
 ...ggregateRecoverDeadLetterChannelFailedTest.java |  11 +-
 ...velDBAggregateRecoverDeadLetterChannelTest.java |  10 +-
 .../leveldb/LevelDBAggregateRecoverTest.java       |  10 +-
 ...DBAggregateRecoverWithRedeliveryPolicyTest.java |  10 +-
 .../LevelDBAggregateRecoverWithSedaTest.java       |  10 +-
 .../LevelDBAggregateSerializedHeadersTest.java     |  10 +-
 .../component/leveldb/LevelDBAggregateTest.java    |  11 +-
 ...velDBAggregateTimeoutCompletionRestartTest.java |  11 +-
 .../LevelDBAggregationRepositoryAlotDataTest.java  |  15 +-
 ...velDBAggregationRepositoryLoadExistingTest.java |  15 +-
 ...velDBAggregationRepositoryMultipleRepoTest.java |  15 +-
 ...DBAggregationRepositoryRecoverExistingTest.java |  13 +-
 .../leveldb/LevelDBAggregationRepositoryTest.java  |  15 +-
 .../component/leveldb/LevelDBBigPayloadTest.java   |  22 ++-
 .../leveldb/LevelDBExchangeSerializationTest.java  |  18 +-
 .../component/leveldb/LevelDBGetNotFoundTest.java  |  25 ++-
 .../camel/component/leveldb/LevelDBSetupTest.java  |   6 +-
 ...ngAggregateRecoverWithRedeliveryPolicyTest.java |  10 +-
 .../leveldb/LevelDBSpringAggregateTest.java        |  10 +-
 components/camel-lra/pom.xml                       |   6 +-
 .../camel/service/lra/AbstractLRATestSupport.java  |  14 +-
 .../org/apache/camel/service/lra/LRACreditIT.java  |   3 +-
 .../apache/camel/service/lra/LRAFailuresIT.java    |   2 +-
 .../org/apache/camel/service/lra/LRAManualIT.java  |   2 +-
 .../org/apache/camel/service/lra/LRAOptionsIT.java |  18 +-
 .../org/apache/camel/service/lra/LRATimeoutIT.java |   2 +-
 components/camel-openapi-java/pom.xml              |   4 +-
 .../openapi/OpenApiRestProducerFactoryTest.java    |   2 +-
 .../camel/openapi/RestOpenApiProcessorTest.java    |   2 +-
 .../RestOpenApiReaderApiDocsOverrideTest.java      |  12 +-
 .../openapi/RestOpenApiReaderApiDocsTest.java      |  12 +-
 .../openapi/RestOpenApiReaderDayOfWeekTest.java    |  11 +-
 ...RestOpenApiReaderEnableVendorExtensionTest.java |  12 +-
 .../RestOpenApiReaderModelApiSecurityTest.java     |  12 +-
 .../RestOpenApiReaderModelBookOrderTest.java       |  11 +-
 .../camel/openapi/RestOpenApiReaderModelTest.java  |  12 +-
 .../RestOpenApiReaderOverrideHostApiDocsTest.java  |  10 +-
 .../RestOpenApiReaderPropertyPlaceholderTest.java  |  13 +-
 .../camel/openapi/RestOpenApiReaderTest.java       |  11 +-
 ...pringRestOpenApiReaderModelApiSecurityTest.java |  12 +-
 .../camel/openapi/producer/RestOpenApiGetTest.java |   4 +-
 .../producer/RestOpenApiGetUriParamTest.java       |   4 +-
 components/camel-reactive-executor-vertx/pom.xml   |   6 +-
 .../camel/reactive/SimpleMockLookupVertxTest.java  |   4 +-
 .../org/apache/camel/reactive/SimpleMockTest.java  |   4 +-
 components/camel-reactor/pom.xml                   |   6 +-
 .../ReactorStreamsServiceBackpressureTest.java     |  32 ++--
 .../engine/ReactorStreamsServiceEventTypeTest.java |   9 +-
 .../ReactorStreamsServiceSubscriberTest.java       |  11 +-
 .../reactor/engine/ReactorStreamsServiceTest.java  |  55 +++---
 .../engine/ReactorStreamsServiceTestSupport.java   |   2 +-
 components/camel-resteasy/pom.xml                  |  11 +-
 .../test/ResteasyConsumerMatchUriOnPrefix.java     |  20 +-
 .../resteasy/test/ResteasyConsumerProxyTest.java   |  32 ++--
 .../resteasy/test/ResteasyConsumerTest.java        |  69 ++++---
 .../test/ResteasyConsumerTwoServletsTest.java      |  26 ++-
 .../resteasy/test/ResteasyMethodRestrictTest.java  |  22 +--
 .../resteasy/test/ResteasyProducerProxyTest.java   |  68 +++----
 .../resteasy/test/ResteasyProducerTest.java        |  72 ++++----
 .../test/ResteasyRestDSLProxyCamelTest.java        |  20 +-
 .../resteasy/test/ResteasyRestDSLProxyTest.java    |  21 ++-
 .../resteasy/test/ResteasyRestDSLTest.java         |  20 +-
 .../resteasy/test/ResteasySetHttpBindingTest.java  |  16 +-
 .../resteasy/test/ResteasySimpleConsumerTest.java  |  30 +--
 .../resteasy/test/ServletInitializerTest.java      |  20 +-
 .../camel/component/resteasy/test/WebTest.java     | 203 +++++++++++++++++++++
 .../camel-resteasy/src/test/resources/pom.xml      |   4 +-
 .../camel-salesforce-component/README.md           |   2 +-
 .../camel-salesforce-component/pom.xml             |   9 +-
 .../AbstractApprovalIntegrationTest.java           |  10 +-
 .../salesforce/AbstractBulkApiTestBase.java        |  11 +-
 .../salesforce/AbstractSalesforceTestBase.java     |   6 +-
 .../salesforce/AnalyticsApiIntegrationTest.java    |  51 +++---
 .../ApprovalExamplesIntegrationTest.java           |   8 +-
 .../salesforce/ApprovalIntegrationTest.java        |  33 ++--
 .../salesforce/BulkApiBatchIntegrationTest.java    |  27 +--
 .../salesforce/BulkApiIntegrationTest.java         |   7 +-
 .../salesforce/BulkApiJobIntegrationTest.java      |  31 ++--
 .../salesforce/BulkApiQueryIntegrationTest.java    |  31 ++--
 .../ChangeEventsConsumerIntegrationTest.java       |  40 ++--
 .../CompositeApiBatchIntegrationTest.java          |  36 ++--
 .../salesforce/CompositeApiIntegrationTest.java    |  33 ++--
 .../CompositeApiTreeIntegrationTest.java           |  35 ++--
 .../salesforce/CompoundTypesIntegrationTest.java   |  14 +-
 .../salesforce/HttpProxyIntegrationTest.java       |  23 +--
 .../salesforce/LimitsIntegrationTest.java          |  13 +-
 .../salesforce/NotFoundIntegrationTest.java        |  34 ++--
 .../PlatformEventsConsumerIntegrationTest.java     |   5 +-
 .../camel/component/salesforce/RawPayloadTest.java |  35 ++--
 .../salesforce/RecentIntegrationTest.java          |  15 +-
 .../salesforce/RestApiIntegrationTest.java         | 110 +++++------
 ...eComponentVerifierExtensionIntegrationTest.java |  41 +++--
 .../SalesforceComponentVerifierExtensionTest.java  |  21 ++-
 .../salesforce/SalesforceConsumerTest.java         |  12 +-
 .../salesforce/SalesforceEndpointTest.java         |  10 +-
 .../SalesforceHeadersIntegrationTest.java          |   2 +-
 ...alesforceJwtBearerTokenFlowIntegrationTest.java |   5 +-
 .../salesforce/SalesforceLoginConfigTest.java      |   4 +-
 .../SalesforceMetaDataExtensionTest.java           |   2 +-
 .../camel/component/salesforce/Standalone.java     |   5 +-
 .../salesforce/StreamingApiIntegrationTest.java    |  25 ++-
 .../api/MultiSelectPicklistJsonTest.java           |   8 +-
 .../salesforce/api/MultiSelectPicklistXmlTest.java |   8 +-
 .../component/salesforce/api/dto/LimitsTest.java   |  21 +--
 .../salesforce/api/dto/PlatformEventTest.java      |   2 +-
 .../salesforce/api/dto/RecentItemTest.java         |  19 +-
 .../salesforce/api/dto/RestErrorTest.java          |   4 +-
 .../api/dto/approval/ApprovalRequestTest.java      |  41 ++---
 .../api/dto/approval/ApprovalRequestsTest.java     |   8 +-
 .../api/dto/approval/ApprovalResultTest.java       |  23 ++-
 .../salesforce/api/dto/approval/ApprovalsTest.java |  27 ++-
 .../api/dto/composite/MapOfMapsConverterTest.java  |   8 +-
 .../dto/composite/SObjectBatchResponseTest.java    |  56 +++---
 .../api/dto/composite/SObjectBatchTest.java        |   8 +-
 .../composite/SObjectCompositeResponseTest.java    |   2 +-
 .../api/dto/composite/SObjectCompositeTest.java    |   2 +-
 .../api/dto/composite/SObjectNodeTest.java         |  82 ++++-----
 .../api/dto/composite/SObjectTreeResponseTest.java |  37 ++--
 .../api/dto/composite/SObjectTreeTest.java         |  14 +-
 .../salesforce/api/utils/JsonUtilsTest.java        |   8 +-
 .../salesforce/api/utils/QueryHelperTest.java      |   2 +-
 .../api/utils/SalesforceTimeFormatsTest.java       |  43 ++---
 .../salesforce/api/utils/VersionTest.java          |  22 +--
 .../salesforce/internal/LoginTokenTest.java        |  12 +-
 .../salesforce/internal/SalesforceSessionTest.java |   8 +-
 .../internal/SessionIntegrationTest.java           |  13 +-
 .../internal/client/AbstractClientBaseTest.java    |   8 +-
 .../client/DefaultCompositeApiClientTest.java      |   9 +-
 .../AbstractRestProcessorApprovalTest.java         |  14 +-
 .../internal/processor/JsonRestProcessorTest.java  |   2 +-
 .../internal/streaming/ReplayExtensionTest.java    |   4 +-
 .../internal/streaming/SubscriptionHelperTest.java |  30 ++-
 .../camel-salesforce-maven-plugin/pom.xml          |   8 +-
 .../AbstractSalesforceMojoIntegrationTest.java     |   2 +-
 .../maven/CamelSalesforceMojoIntegrationTest.java  |   2 +-
 .../camel/maven/CamelSalesforceMojoOutputTest.java |  24 +--
 .../org/apache/camel/maven/GenerateMojoTest.java   |   8 +-
 .../camel/maven/HttpProxyMojoIntegrationTest.java  |   8 +-
 .../camel/maven/SchemaMojoIntegrationTest.java     |   8 +-
 components/camel-schematron/pom.xml                |   2 +-
 .../schematron/SchematronComponentTest.java        |   6 +-
 .../schematron/SchematronEndpointTest.java         |   6 +-
 .../schematron/SchematronProducerTest.java         |  10 +-
 .../processor/SchematronProcessorTest.java         |   4 +-
 .../schematron/processor/TemplatesFactoryTest.java |   7 +-
 .../camel-servicenow-component/pom.xml             |   6 +-
 .../servicenow/ServiceNowAttachmentTest.java       |   6 +-
 .../ServiceNowComponentVerifierExtensionTest.java  |  71 +++----
 .../ServiceNowComponentVerifierTest.java           |  71 +++----
 .../servicenow/ServiceNowImportSetTest.java        |   9 +-
 .../ServiceNowMetaDataExtensionTest.java           |  38 ++--
 .../servicenow/ServiceNowScorecardTest.java        |   4 +-
 .../servicenow/ServiceNowServiceCatalogTest.java   |  14 +-
 .../component/servicenow/ServiceNowTableTest.java  |   8 +-
 .../camel/component/servicenow/ServiceNowTest.java |  21 ++-
 .../servicenow/ServiceNowTestSupport.java          |   2 +-
 .../camel-servicenow-maven-plugin/pom.xml          |   6 +-
 .../maven/CamelServiceNowGenerateMojoTest.java     |   9 +-
 components/camel-shiro/pom.xml                     |   6 +-
 .../security/ShiroAuthenticationBase64Test.java    |   4 +-
 ...nticationReauthenticateFalseAndNewUserTest.java |   4 +-
 .../shiro/security/ShiroAuthenticationTest.java    |   7 +-
 .../shiro/security/ShiroAuthorizationTest.java     |   4 +-
 .../security/ShiroRolesAuthorizationTest.java      |   4 +-
 components/camel-sip/pom.xml                       |   6 +-
 .../camel/component/sip/PublishSubscribeTest.java  |  12 +-
 components/camel-slack/pom.xml                     |   2 +-
 .../slack/SlackComponentVerifierExtensionTest.java |  19 +-
 .../camel/component/slack/SlackConsumerTest.java   |  13 +-
 .../camel/component/slack/SlackProducerTest.java   |   4 +-
 components/camel-smpp/pom.xml                      |  13 +-
 .../component/smpp/AbstractSmppCommandTest.java    |   8 +-
 .../smpp/MessageReceiverListenerImplTest.java      |  10 +-
 .../camel/component/smpp/Smpp8BitSplitterTest.java |   6 +-
 .../camel/component/smpp/SmppBindingTest.java      |  32 ++--
 .../component/smpp/SmppCancelSmCommandTest.java    |   8 +-
 .../camel/component/smpp/SmppCommandTypeTest.java  |   8 +-
 .../camel/component/smpp/SmppComponentTest.java    |  14 +-
 .../component/smpp/SmppConfigurationTest.java      |  10 +-
 .../component/smpp/SmppConnectionFactoryTest.java  |  26 +--
 .../camel/component/smpp/SmppConsumerTest.java     |   8 +-
 .../component/smpp/SmppDataSmCommandTest.java      |  22 +--
 .../component/smpp/SmppDefaultSplitterTest.java    |   6 +-
 .../camel/component/smpp/SmppMessageTest.java      |  18 +-
 .../camel/component/smpp/SmppNLSTSplitterTest.java |   6 +-
 .../smpp/SmppProducerLazySessionCreationTest.java  |   6 +-
 .../camel/component/smpp/SmppProducerTest.java     |   8 +-
 .../component/smpp/SmppQuerySmCommandTest.java     |  10 +-
 .../component/smpp/SmppReplaceSmCommandTest.java   |  16 +-
 .../camel/component/smpp/SmppSplitterTest.java     |   6 +-
 .../component/smpp/SmppSubmitMultiCommandTest.java |  22 +--
 .../component/smpp/SmppSubmitSmCommandTest.java    |  28 ++-
 .../camel/component/smpp/SmppUcs2SplitterTest.java |   6 +-
 .../apache/camel/component/smpp/SmppUtilsTest.java |  12 +-
 .../integration/SmppComponentIntegrationTest.java  |  12 +-
 .../SmppComponentSpringIntegrationTest.java        |  12 +-
 .../SmppConsumerReconnectIntegrationTest.java      |   8 +-
 .../SmppProducerReconnectIntegrationTest.java      |   8 +-
 components/camel-snakeyaml/pom.xml                 |   6 +-
 .../component/snakeyaml/SnakeYAMLDoSTest.java      |   8 +-
 .../component/snakeyaml/SnakeYAMLSpringTest.java   |   4 +-
 .../snakeyaml/SnakeYAMLSpringTypeFilterTest.java   |   4 +-
 .../camel/component/snakeyaml/SnakeYAMLTest.java   |  28 ++-
 .../component/snakeyaml/SnakeYAMLTestHelper.java   |   4 +-
 .../snakeyaml/SnakeYAMLTypeFilterHelper.java       |   6 +-
 .../snakeyaml/SnakeYAMLTypeFilterTest.java         |   4 +-
 .../snakeyaml/SnakeYAMLUnmarshalTypeTest.java      |   7 +-
 components/camel-spring-security/pom.xml           |   6 +-
 .../SpringSecurityAuthorizationPolicyTest.java     |  13 +-
 ...pringSecurityAuthorizationPolicyConfigTest.java |  36 ++--
 components/camel-test-junit5/pom.xml               |  12 +-
 .../camel/test/junit5/params/Parameter.java}       |  14 +-
 .../camel/test/junit5/params/Parameterized.java}   |  19 +-
 .../test/junit5/params/ParameterizedExtension.java | 127 +++++++++++++
 .../camel/test/junit5/params/Parameters.java}      |  17 +-
 .../org/apache/camel/test/junit5/params/Test.java} |  16 +-
 components/camel-velocity/pom.xml                  |   6 +-
 .../velocity/VelocityBodyAsDomainObjectTest.java   |   4 +-
 .../component/velocity/VelocityConcurrentTest.java |   6 +-
 .../velocity/VelocityContentCacheTest.java         |   8 +-
 .../velocity/VelocityDynamicTemplateTest.java      |   4 +-
 .../component/velocity/VelocityLetterTest.java     |   4 +-
 .../velocity/VelocityMethodInvokationTest.java     |   6 +-
 .../velocity/VelocityOverridesPropertiesTest.java  |   6 +-
 .../component/velocity/VelocitySetHeaderTest.java  |   4 +-
 .../velocity/VelocitySetTemplateViaHeaderTest.java |   4 +-
 .../VelocitySomeValuesNotInExchangeTest.java       |   4 +-
 .../velocity/VelocitySupplementalContextTest.java  |   4 +-
 .../velocity/VelocityTemplateInHeaderTest.java     |  14 +-
 .../camel/component/velocity/VelocityTest.java     |   6 +-
 .../velocity/VelocityValuesInPropertiesTest.java   |   4 +-
 components/camel-xslt-saxon/pom.xml                |   2 +-
 .../component/xslt/saxon/SAXSourceLogBodyTest.java |   4 +-
 .../camel/component/xslt/saxon/XsltSaxonTest.java  |   7 +-
 244 files changed, 2216 insertions(+), 1621 deletions(-)
 create mode 100644 components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/WebTest.java
 copy components/{camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java => camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameter.java} (78%)
 copy components/{camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java => camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameterized.java} (65%)
 create mode 100644 components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/ParameterizedExtension.java
 copy components/{camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java => camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameters.java} (70%)
 copy components/{camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java => camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Test.java} (76%)


[camel] 17/18: [CAMEL-11807] Upgrade camel-smpp to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 55b6f6dfbf83a5b92e6591fd82d73d3d442446f9
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 17:58:45 2020 +0200

    [CAMEL-11807] Upgrade camel-smpp to junit5
---
 components/camel-smpp/pom.xml                      | 13 ++++++---
 .../component/smpp/AbstractSmppCommandTest.java    |  8 +++---
 .../smpp/MessageReceiverListenerImplTest.java      | 10 +++----
 .../camel/component/smpp/Smpp8BitSplitterTest.java |  6 ++--
 .../camel/component/smpp/SmppBindingTest.java      | 32 +++++++++++-----------
 .../component/smpp/SmppCancelSmCommandTest.java    |  8 +++---
 .../camel/component/smpp/SmppCommandTypeTest.java  |  8 +++---
 .../camel/component/smpp/SmppComponentTest.java    | 14 +++++-----
 .../component/smpp/SmppConfigurationTest.java      | 10 +++----
 .../component/smpp/SmppConnectionFactoryTest.java  | 26 ++++++++++--------
 .../camel/component/smpp/SmppConsumerTest.java     |  8 +++---
 .../component/smpp/SmppDataSmCommandTest.java      | 22 +++++++--------
 .../component/smpp/SmppDefaultSplitterTest.java    |  6 ++--
 .../camel/component/smpp/SmppMessageTest.java      | 18 ++++++------
 .../camel/component/smpp/SmppNLSTSplitterTest.java |  6 ++--
 .../smpp/SmppProducerLazySessionCreationTest.java  |  6 ++--
 .../camel/component/smpp/SmppProducerTest.java     |  8 +++---
 .../component/smpp/SmppQuerySmCommandTest.java     | 10 +++----
 .../component/smpp/SmppReplaceSmCommandTest.java   | 16 +++++------
 .../camel/component/smpp/SmppSplitterTest.java     |  6 ++--
 .../component/smpp/SmppSubmitMultiCommandTest.java | 22 +++++++--------
 .../component/smpp/SmppSubmitSmCommandTest.java    | 28 +++++++++----------
 .../camel/component/smpp/SmppUcs2SplitterTest.java |  6 ++--
 .../apache/camel/component/smpp/SmppUtilsTest.java | 12 ++++----
 .../integration/SmppComponentIntegrationTest.java  | 12 +++++---
 .../SmppComponentSpringIntegrationTest.java        | 12 +++++---
 .../SmppConsumerReconnectIntegrationTest.java      |  8 +++---
 .../SmppProducerReconnectIntegrationTest.java      |  8 +++---
 28 files changed, 181 insertions(+), 168 deletions(-)

diff --git a/components/camel-smpp/pom.xml b/components/camel-smpp/pom.xml
index 5c44258..6417736 100644
--- a/components/camel-smpp/pom.xml
+++ b/components/camel-smpp/pom.xml
@@ -48,18 +48,23 @@
 
         <!-- testing -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</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>
             <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>
         <dependency>
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/AbstractSmppCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/AbstractSmppCommandTest.java
index a7e5d57..802f50c 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/AbstractSmppCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/AbstractSmppCommandTest.java
@@ -23,10 +23,10 @@ import org.apache.camel.support.DefaultExchange;
 import org.jsmpp.bean.OptionalParameter;
 import org.jsmpp.bean.OptionalParameter.Tag;
 import org.jsmpp.session.SMPPSession;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 public class AbstractSmppCommandTest {
     
@@ -34,7 +34,7 @@ public class AbstractSmppCommandTest {
     private SmppConfiguration config = new SmppConfiguration();
     private AbstractSmppCommand command;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         session = new SMPPSession();
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/MessageReceiverListenerImplTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/MessageReceiverListenerImplTest.java
index 2762bd9..6e14540 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/MessageReceiverListenerImplTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/MessageReceiverListenerImplTest.java
@@ -28,11 +28,11 @@ import org.jsmpp.session.DataSmResult;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.util.MessageIDGenerator;
 import org.jsmpp.util.MessageId;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -44,7 +44,7 @@ public class MessageReceiverListenerImplTest {
     private Processor processor;
     private ExceptionHandler exceptionHandler;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         endpoint = mock(SmppEndpoint.class);
         processor = mock(Processor.class);
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/Smpp8BitSplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/Smpp8BitSplitterTest.java
index 92edc9b..e6559c3 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/Smpp8BitSplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/Smpp8BitSplitterTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.smpp;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class Smpp8BitSplitterTest {
 
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
index 77eb702..57185a3 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppBindingTest.java
@@ -35,16 +35,16 @@ import org.jsmpp.bean.OptionalParameter.Tag;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.util.DeliveryReceiptState;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+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.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  * JUnit test class for <code>org.apache.camel.component.smpp.SmppBinding</code>
@@ -54,7 +54,7 @@ public class SmppBindingTest {
     private SmppBinding binding;
     private CamelContext camelContext;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         binding = new SmppBinding() {
             Date getCurrentDate() {
@@ -161,7 +161,7 @@ public class SmppBindingTest {
         assertEquals(Byte.valueOf((byte) 0x01), optionalParameters.get("DEST_ADDR_SUBUNIT"));
         assertEquals(Short.valueOf((short) 1), optionalParameters.get("DEST_TELEMATICS_ID"));
         assertEquals(Integer.valueOf(1), optionalParameters.get("QOS_TIME_TO_LIVE"));
-        assertNull("0x00", optionalParameters.get("ALERT_ON_MESSAGE_DELIVERY"));
+        assertNull(optionalParameters.get("ALERT_ON_MESSAGE_DELIVERY"), "0x00");
 
         Map<Short, Object> optionalParameter = smppMessage.getHeader(SmppConstants.OPTIONAL_PARAMETER, Map.class);
         assertEquals(6, optionalParameter.size());
@@ -170,7 +170,7 @@ public class SmppBindingTest {
         assertEquals(Byte.valueOf((byte) 0x01), optionalParameter.get(Short.valueOf((short) 0x0005)));
         assertEquals(Short.valueOf((short) 1), optionalParameter.get(Short.valueOf((short) 0x0008)));
         assertEquals(Integer.valueOf(1), optionalParameter.get(Short.valueOf((short) 0x0017)));
-        assertNull("0x00", optionalParameter.get(Short.valueOf((short) 0x130C)));
+        assertNull(optionalParameter.get(Short.valueOf((short) 0x130C)), "0x00");
     }
 
     @Test
@@ -336,11 +336,11 @@ public class SmppBindingTest {
                 binding.getConfiguration().setEncoding(encoding);
                 SmppMessage smppMessage = binding.createSmppMessage(camelContext, deliverSm);
                 assertArrayEquals(
-                    String.format("data coding=0x%02X; encoding=%s",
-                                  dataCoding,
-                                  encoding),
                     body,
-                    smppMessage.getBody(byte[].class));
+                    smppMessage.getBody(byte[].class),
+                    String.format("data coding=0x%02X; encoding=%s",
+                            dataCoding,
+                            encoding));
             }
         }
     }
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCancelSmCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCancelSmCommandTest.java
index 9cb3a66..5be79c0 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCancelSmCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCancelSmCommandTest.java
@@ -23,10 +23,10 @@ import org.apache.camel.support.DefaultExchange;
 import org.jsmpp.bean.NumberingPlanIndicator;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.SMPPSession;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
 
@@ -36,7 +36,7 @@ public class SmppCancelSmCommandTest {
     private SmppConfiguration config;
     private SmppCancelSmCommand command;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCommandTypeTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCommandTypeTest.java
index e896b76..1b42151 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCommandTypeTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppCommandTypeTest.java
@@ -19,16 +19,16 @@ package org.apache.camel.component.smpp;
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 public class SmppCommandTypeTest {
     
     private Exchange exchange;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         exchange = new DefaultExchange(new DefaultCamelContext());
     }
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
index 9262414..052be81 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppComponentTest.java
@@ -23,13 +23,13 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.Endpoint;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertSame;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * JUnit test class for <code>org.apache.camel.component.smpp.SmppComponent</code>
@@ -39,7 +39,7 @@ public class SmppComponentTest {
     private SmppComponent component;
     private DefaultCamelContext context;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         context = new DefaultCamelContext();
         context.start();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
index 5ce9c90..481a666 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConfigurationTest.java
@@ -27,11 +27,11 @@ import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.extra.SessionState;
 import org.jsmpp.session.Session;
 import org.jsmpp.session.SessionStateListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  * JUnit test class for <code>org.apache.camel.component.smpp.SmppConfiguration</code>
@@ -40,7 +40,7 @@ public class SmppConfigurationTest {
 
     private SmppConfiguration configuration;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         configuration = new SmppConfiguration();
         configuration.setServiceType("CMT");
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConnectionFactoryTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConnectionFactoryTest.java
index 49d8629..b3b650e 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConnectionFactoryTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConnectionFactoryTest.java
@@ -19,9 +19,11 @@ package org.apache.camel.component.smpp;
 import java.io.IOException;
 
 import org.jsmpp.session.connection.Connection;
-import org.junit.Assert;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * JUnit test class for <code>org.apache.camel.component.smpp.SmppConnectionFactory</code>
@@ -29,15 +31,15 @@ import org.junit.Test;
 public class SmppConnectionFactoryTest {
 
     @Test
-    @Ignore("Must be manually tested")
+    @Disabled("Must be manually tested")
     public void createConnection() throws IOException {
         SmppConfiguration configuration = new SmppConfiguration();
         SmppConnectionFactory factory = SmppConnectionFactory.getInstance(configuration);
         Connection connection = factory.createConnection("localhost", 2775);
 
         try {
-            Assert.assertNotNull(connection);
-            Assert.assertTrue(connection.isOpen());            
+            assertNotNull(connection);
+            assertTrue(connection.isOpen());
         } finally {
             if (connection != null) {
                 connection.close();
@@ -46,7 +48,7 @@ public class SmppConnectionFactoryTest {
     }
     
     @Test
-    @Ignore("Must be manually tested")
+    @Disabled("Must be manually tested")
     public void createConnectionWithProxyHost() throws IOException {
         SmppConfiguration configuration = new SmppConfiguration();
         configuration.setHttpProxyHost("localhost");
@@ -55,8 +57,8 @@ public class SmppConnectionFactoryTest {
         Connection connection = factory.createConnection("localhost", 2775);
 
         try {
-            Assert.assertNotNull(connection);
-            Assert.assertTrue(connection.isOpen());
+            assertNotNull(connection);
+            assertTrue(connection.isOpen());
         } finally {
             if (connection != null) {
                 connection.close();
@@ -65,7 +67,7 @@ public class SmppConnectionFactoryTest {
     }
     
     @Test
-    @Ignore("Must be manually tested")
+    @Disabled("Must be manually tested")
     public void createConnectionWithProxyUsername() throws IOException {
         SmppConfiguration configuration = new SmppConfiguration();
         configuration.setHttpProxyHost("localhost");
@@ -76,8 +78,8 @@ public class SmppConnectionFactoryTest {
         Connection connection = factory.createConnection("localhost", 2775);
 
         try {
-            Assert.assertNotNull(connection);
-            Assert.assertTrue(connection.isOpen());            
+            assertNotNull(connection);
+            assertTrue(connection.isOpen());
         } finally {
             if (connection != null) {
                 connection.close();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
index 05e5ce7..271a582 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppConsumerTest.java
@@ -24,10 +24,10 @@ import org.jsmpp.session.BindParameter;
 import org.jsmpp.session.MessageReceiverListener;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.session.SessionStateListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.reset;
@@ -45,7 +45,7 @@ public class SmppConsumerTest {
     private Processor processor;
     private SMPPSession session;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         configuration = new SmppConfiguration();
         configuration.setServiceType("CMT");
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDataSmCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDataSmCommandTest.java
index 149c50f..456352e 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDataSmCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDataSmCommandTest.java
@@ -35,14 +35,14 @@ import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.DataSmResult;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.util.MessageId;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
@@ -55,21 +55,21 @@ public class SmppDataSmCommandTest {
     private SmppConfiguration config;
     private SmppDataSmCommand command;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         defaultTimeZone = TimeZone.getDefault();
         
         TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDownAfterClass() {
         if (defaultTimeZone != null) {
             TimeZone.setDefault(defaultTimeZone);
         }
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDefaultSplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDefaultSplitterTest.java
index 847d414..bdc8eea 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDefaultSplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppDefaultSplitterTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.smpp;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SmppDefaultSplitterTest {
     
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
index 8600b79..90e60d1 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppMessageTest.java
@@ -24,13 +24,13 @@ import org.apache.camel.impl.DefaultCamelContext;
 import org.jsmpp.bean.AlertNotification;
 import org.jsmpp.bean.DataSm;
 import org.jsmpp.bean.DeliverSm;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+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;
 
 /**
  * JUnit test class for <code>org.apache.camel.component.smpp.SmppMessage</code>
@@ -127,10 +127,10 @@ public class SmppMessageTest {
                 message = new SmppMessage(camelContext, command, config);
                 
                 assertArrayEquals(
+                    body, (byte[])message.createBody(),
                     String.format("data coding=0x%02X; encoding=%s",
-                                  dataCoding,
-                                  encoding),
-                    body, (byte[])message.createBody());
+                                dataCoding,
+                                encoding));
             }
         }
     }
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppNLSTSplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppNLSTSplitterTest.java
index 92eb3d6..84b70dc8 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppNLSTSplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppNLSTSplitterTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.smpp;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SmppNLSTSplitterTest {
 
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerLazySessionCreationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerLazySessionCreationTest.java
index 40afcf7..5fd80cf 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerLazySessionCreationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerLazySessionCreationTest.java
@@ -24,8 +24,8 @@ import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.BindParameter;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.session.SessionStateListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.mock;
@@ -42,7 +42,7 @@ public class SmppProducerLazySessionCreationTest {
     private SmppEndpoint endpoint;
     private SMPPSession session;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         configuration = new SmppConfiguration();
         configuration.setLazySessionCreation(true);
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
index b7c3e84..9d1a73ee 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppProducerTest.java
@@ -23,10 +23,10 @@ import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.BindParameter;
 import org.jsmpp.session.SMPPSession;
 import org.jsmpp.session.SessionStateListener;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertSame;
 import static org.mockito.ArgumentMatchers.isA;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.verify;
@@ -42,7 +42,7 @@ public class SmppProducerTest {
     private SmppEndpoint endpoint;
     private SMPPSession session;
 
-    @Before
+    @BeforeEach
     public void setUp() {
         configuration = new SmppConfiguration();
         configuration.setServiceType("CMT");
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppQuerySmCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppQuerySmCommandTest.java
index 6ce0423..1955b51 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppQuerySmCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppQuerySmCommandTest.java
@@ -25,11 +25,11 @@ import org.jsmpp.bean.NumberingPlanIndicator;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.QuerySmResult;
 import org.jsmpp.session.SMPPSession;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -39,7 +39,7 @@ public class SmppQuerySmCommandTest {
     private SmppConfiguration config;
     private SmppQuerySmCommand command;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppReplaceSmCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppReplaceSmCommandTest.java
index fd69472..480fdb9 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppReplaceSmCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppReplaceSmCommandTest.java
@@ -29,12 +29,12 @@ import org.jsmpp.bean.RegisteredDelivery;
 import org.jsmpp.bean.SMSCDeliveryReceipt;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.SMPPSession;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.mock;
@@ -48,21 +48,21 @@ public class SmppReplaceSmCommandTest {
     private SmppConfiguration config;
     private SmppReplaceSmCommand command;
     
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         defaultTimeZone = TimeZone.getDefault();
         
         TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     }
     
-    @AfterClass
+    @AfterAll
     public static void tearDownAfterClass() {
         if (defaultTimeZone != null) {
             TimeZone.setDefault(defaultTimeZone);            
         }
     }
     
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSplitterTest.java
index 6fd40bc..db630f0 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSplitterTest.java
@@ -16,10 +16,10 @@
  */
 package org.apache.camel.component.smpp;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SmppSplitterTest {
     
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitMultiCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitMultiCommandTest.java
index 974d46a..ca098f9 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitMultiCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitMultiCommandTest.java
@@ -41,14 +41,14 @@ import org.jsmpp.bean.SubmitMultiResult;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.bean.UnsuccessDelivery;
 import org.jsmpp.session.SMPPSession;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.mock;
@@ -62,21 +62,21 @@ public class SmppSubmitMultiCommandTest {
     private SmppConfiguration config;
     private SmppSubmitMultiCommand command;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         defaultTimeZone = TimeZone.getDefault();
         
         TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDownAfterClass() {
         if (defaultTimeZone != null) {
             TimeZone.setDefault(defaultTimeZone);
         }
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitSmCommandTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitSmCommandTest.java
index 64eda84..4e921c2 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitSmCommandTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppSubmitSmCommandTest.java
@@ -38,14 +38,15 @@ import org.jsmpp.bean.ReplaceIfPresentFlag;
 import org.jsmpp.bean.SMSCDeliveryReceipt;
 import org.jsmpp.bean.TypeOfNumber;
 import org.jsmpp.session.SMPPSession;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.not;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.ArgumentMatchers.isNull;
 import static org.mockito.Mockito.mock;
@@ -60,21 +61,21 @@ public class SmppSubmitSmCommandTest {
     private SmppConfiguration config;
     private SmppSubmitSmCommand command;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         defaultTimeZone = TimeZone.getDefault();
 
         TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     }
 
-    @AfterClass
+    @AfterAll
     public static void tearDownAfterClass() {
         if (defaultTimeZone != null) {
             TimeZone.setDefault(defaultTimeZone);
         }
     }
 
-    @Before
+    @BeforeEach
     public void setUp() {
         session = mock(SMPPSession.class);
         config = new SmppConfiguration();
@@ -103,7 +104,7 @@ public class SmppSubmitSmCommandTest {
     }
 
     @Test
-    @Ignore()
+    @Disabled()
     public void executeLongBody() throws Exception {
         byte[] firstSM = new byte[]{5, 0, 3, 1, 2, 1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54,
             55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50,
@@ -132,7 +133,7 @@ public class SmppSubmitSmCommandTest {
         assertEquals(2, exchange.getMessage().getHeader(SmppConstants.SENT_MESSAGE_COUNT));
     }
 
-    @Test(expected = SmppException.class)
+    @Test
     public void executeLongBodyRejection() throws Exception {
         byte[] firstSM = new byte[]{5, 0, 3, 1, 2, 1, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54,
             55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50,
@@ -156,10 +157,7 @@ public class SmppSubmitSmCommandTest {
                 eq(DataCodings.newInstance((byte) 0)), eq((byte) 0), eq(secondSM)))
                 .thenReturn("2");
 
-        command.execute(exchange);
-
-        assertEquals(Arrays.asList("1", "2"), exchange.getMessage().getHeader(SmppConstants.ID));
-        assertEquals(2, exchange.getMessage().getHeader(SmppConstants.SENT_MESSAGE_COUNT));
+        assertThrows(SmppException.class, () -> command.execute(exchange));
     }
 
     @Test
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
index 1346c2c..7242929 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUcs2SplitterTest.java
@@ -18,10 +18,10 @@ package org.apache.camel.component.smpp;
 
 import java.nio.charset.Charset;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SmppUcs2SplitterTest {
 
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUtilsTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUtilsTest.java
index bb46656..b85c6f6 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUtilsTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/SmppUtilsTest.java
@@ -20,24 +20,24 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.TimeZone;
 
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SmppUtilsTest {
     
     private static TimeZone defaultTimeZone;
     
-    @BeforeClass
+    @BeforeAll
     public static void setUpBeforeClass() {
         defaultTimeZone = TimeZone.getDefault();
         
         TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
     }
     
-    @AfterClass
+    @AfterAll
     public static void tearDownAfterClass() {
         if (defaultTimeZone != null) {
             TimeZone.setDefault(defaultTimeZone);            
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
index 051f724..3b74273 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentIntegrationTest.java
@@ -24,9 +24,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.smpp.SmppConstants;
 import org.apache.camel.component.smpp.SmppMessageType;
-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;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 /**
  * Spring based integration test for the smpp component. To run this test, ensure that
@@ -38,7 +42,7 @@ import org.junit.Test;
  * <br/>
  * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
  */
-@Ignore("Must be manually tested")
+@Disabled("Must be manually tested")
 public class SmppComponentIntegrationTest extends CamelTestSupport {
     
     @EndpointInject("mock:result")
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
index 5dc2104..ade2069 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppComponentSpringIntegrationTest.java
@@ -23,11 +23,15 @@ import org.apache.camel.ExchangePattern;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.smpp.SmppConstants;
 import org.apache.camel.component.smpp.SmppMessageType;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 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.assertNull;
+
 /**
  * Spring based integration test for the smpp component. To run this test, ensure that
  * the SMSC is running on:
@@ -38,7 +42,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
  * <br/>
  * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
  */
-@Ignore("Must be manually tested")
+@Disabled("Must be manually tested")
 public class SmppComponentSpringIntegrationTest extends CamelSpringTestSupport {
 
     @EndpointInject("mock:result")
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppConsumerReconnectIntegrationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppConsumerReconnectIntegrationTest.java
index c2b99b1..f231014 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppConsumerReconnectIntegrationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppConsumerReconnectIntegrationTest.java
@@ -17,9 +17,9 @@
 package org.apache.camel.component.smpp.integration;
 
 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;
 
 /**
  * Spring based integration test for the smpp component. To run this test, ensure that
@@ -31,7 +31,7 @@ import org.junit.Test;
  * <br/>
  * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
  */
-@Ignore("Must be manually tested")
+@Disabled("Must be manually tested")
 public class SmppConsumerReconnectIntegrationTest extends CamelTestSupport {
 
     @Test
diff --git a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppProducerReconnectIntegrationTest.java b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppProducerReconnectIntegrationTest.java
index d2fbc30..9cebd9f 100644
--- a/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppProducerReconnectIntegrationTest.java
+++ b/components/camel-smpp/src/test/java/org/apache/camel/component/smpp/integration/SmppProducerReconnectIntegrationTest.java
@@ -17,9 +17,9 @@
 package org.apache.camel.component.smpp.integration;
 
 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;
 
 /**
  * Spring based integration test for the smpp component. To run this test, ensure that
@@ -31,7 +31,7 @@ import org.junit.Test;
  * <br/>
  * A SMSC for test is available here: http://www.seleniumsoftware.com/downloads.html
  */
-@Ignore("Must be manually tested")
+@Disabled("Must be manually tested")
 public class SmppProducerReconnectIntegrationTest extends CamelTestSupport {
 
     @Test


[camel] 08/18: [CAMEL-11807] Upgrade camel-spring-security to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d2bbbd2b6fad1a505f7e9581d6aa7d58cf1e8ba0
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:09:46 2020 +0200

    [CAMEL-11807] Upgrade camel-spring-security to junit5
---
 components/camel-spring-security/pom.xml           |  6 ++--
 .../SpringSecurityAuthorizationPolicyTest.java     | 13 +++++---
 ...pringSecurityAuthorizationPolicyConfigTest.java | 36 ++++++++++++----------
 3 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/components/camel-spring-security/pom.xml b/components/camel-spring-security/pom.xml
index 9a06589..31f6039 100644
--- a/components/camel-spring-security/pom.xml
+++ b/components/camel-spring-security/pom.xml
@@ -86,7 +86,7 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -95,8 +95,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java b/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
index 7c69482..002e570 100644
--- a/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
+++ b/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicyTest.java
@@ -24,8 +24,8 @@ import javax.security.auth.Subject;
 import org.apache.camel.CamelAuthorizationException;
 import org.apache.camel.Exchange;
 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.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
@@ -34,6 +34,9 @@ import org.springframework.security.core.GrantedAuthority;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
+
 public class SpringSecurityAuthorizationPolicyTest extends CamelSpringTestSupport {
 
     @Test
@@ -53,7 +56,7 @@ public class SpringSecurityAuthorizationPolicyTest extends CamelSpringTestSuppor
             fail("we should get the access deny exception here");
         } catch (Exception exception) {
             // the exception should be caused by CamelAuthorizationException
-            assertTrue("Expect CamelAuthorizationException here", exception.getCause() instanceof CamelAuthorizationException);
+            assertTrue(exception.getCause() instanceof CamelAuthorizationException, "Expect CamelAuthorizationException here");
         }
         end.assertIsSatisfied();
     }
@@ -67,7 +70,7 @@ public class SpringSecurityAuthorizationPolicyTest extends CamelSpringTestSuppor
             fail("we should get the access deny exception here");
         } catch (Exception exception) {
             // the exception should be caused by CamelAuthorizationException
-            assertTrue("Expect CamelAuthorizationException here", exception.getCause() instanceof CamelAuthorizationException);
+            assertTrue(exception.getCause() instanceof CamelAuthorizationException, "Expect CamelAuthorizationException here");
         }
         end.assertIsSatisfied();
     }
@@ -100,7 +103,7 @@ public class SpringSecurityAuthorizationPolicyTest extends CamelSpringTestSuppor
             fail("we should get the access deny exception here");
         } catch (Exception exception) {
             // the exception should be caused by CamelAuthorizationException
-            assertTrue("Expect CamelAuthorizationException here", exception.getCause() instanceof CamelAuthorizationException);
+            assertTrue(exception.getCause() instanceof CamelAuthorizationException, "Expect CamelAuthorizationException here");
         }
         end.assertIsSatisfied();
     }
diff --git a/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicyConfigTest.java b/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicyConfigTest.java
index 1ef623d..6cf416b 100644
--- a/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicyConfigTest.java
+++ b/components/camel-spring-security/src/test/java/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicyConfigTest.java
@@ -18,24 +18,26 @@ package org.apache.camel.component.spring.security.config;
 
 import org.apache.camel.component.spring.security.SpringSecurityAuthorizationPolicy;
 import org.apache.camel.util.IOHelper;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
-public class SpringSecurityAuthorizationPolicyConfigTest extends Assert {
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+public class SpringSecurityAuthorizationPolicyConfigTest {
     
     private AbstractXmlApplicationContext context;
     
-    @Before
+    @BeforeEach
     public void setUp() {
         context = 
             new ClassPathXmlApplicationContext(new String[] {"/org/apache/camel/component/spring/security/config/SpringSecurityAuthorizationPolicy.xml"});
     }
     
-    @After
+    @AfterEach
     public void tearDown() {
         IOHelper.close(context);
     }
@@ -44,19 +46,19 @@ public class SpringSecurityAuthorizationPolicyConfigTest extends Assert {
     public void testAuthorizationPolicy() {
                 
         SpringSecurityAuthorizationPolicy adminPolicy = context.getBean("admin", SpringSecurityAuthorizationPolicy.class);
-        assertNotNull("We should get admin policy", adminPolicy);
-        assertNotNull("The accessDecisionManager should not be null", adminPolicy.getAccessDecisionManager());
-        assertNotNull("The authenticationManager should not be null", adminPolicy.getAuthenticationManager());
-        assertNotNull("The springSecurityAccessPolicy should not be null", adminPolicy.getSpringSecurityAccessPolicy());
+        assertNotNull(adminPolicy, "We should get admin policy");
+        assertNotNull(adminPolicy.getAccessDecisionManager(), "The accessDecisionManager should not be null");
+        assertNotNull(adminPolicy.getAuthenticationManager(), "The authenticationManager should not be null");
+        assertNotNull(adminPolicy.getSpringSecurityAccessPolicy(), "The springSecurityAccessPolicy should not be null");
         
         SpringSecurityAuthorizationPolicy userPolicy = context.getBean("user", SpringSecurityAuthorizationPolicy.class);
-        assertNotNull("We should get user policy", userPolicy);
-        assertNotNull("The accessDecisionManager should not be null", userPolicy.getAccessDecisionManager());
-        assertNotNull("The authenticationManager should not be null", userPolicy.getAuthenticationManager());
-        assertNotNull("The springSecurityAccessPolicy should not be null", userPolicy.getSpringSecurityAccessPolicy());
+        assertNotNull(userPolicy, "We should get user policy");
+        assertNotNull(userPolicy.getAccessDecisionManager(), "The accessDecisionManager should not be null");
+        assertNotNull(userPolicy.getAuthenticationManager(), "The authenticationManager should not be null");
+        assertNotNull(userPolicy.getSpringSecurityAccessPolicy(), "The springSecurityAccessPolicy should not be null");
         
-        assertEquals("user policy and admin policy should have same accessDecisionManager", adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager());
-        assertEquals("user policy and admin policy should have same authenticationManager", adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager());
+        assertEquals(adminPolicy.getAccessDecisionManager(), userPolicy.getAccessDecisionManager(), "user policy and admin policy should have same accessDecisionManager");
+        assertEquals(adminPolicy.getAuthenticationManager(), userPolicy.getAuthenticationManager(), "user policy and admin policy should have same authenticationManager");
     }
 
 }


[camel] 01/18: [CAMEL-11807] Upgrade camel-salesforce to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit ef027fb86b85b2a140a05ea158c95e5b780e343b
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Tue Jul 21 16:31:07 2020 +0200

    [CAMEL-11807] Upgrade camel-salesforce to junit5
---
 .../camel-salesforce-component/README.md           |   2 +-
 .../camel-salesforce-component/pom.xml             |   9 +-
 .../AbstractApprovalIntegrationTest.java           |  10 +-
 .../salesforce/AbstractBulkApiTestBase.java        |  11 +-
 .../salesforce/AbstractSalesforceTestBase.java     |   6 +-
 .../salesforce/AnalyticsApiIntegrationTest.java    |  51 +++++----
 .../ApprovalExamplesIntegrationTest.java           |   8 +-
 .../salesforce/ApprovalIntegrationTest.java        |  33 +++---
 .../salesforce/BulkApiBatchIntegrationTest.java    |  27 ++---
 .../salesforce/BulkApiIntegrationTest.java         |   7 +-
 .../salesforce/BulkApiJobIntegrationTest.java      |  31 ++---
 .../salesforce/BulkApiQueryIntegrationTest.java    |  31 +++--
 .../ChangeEventsConsumerIntegrationTest.java       |  40 ++++---
 .../CompositeApiBatchIntegrationTest.java          |  36 +++---
 .../salesforce/CompositeApiIntegrationTest.java    |  33 +++---
 .../CompositeApiTreeIntegrationTest.java           |  35 +++---
 .../salesforce/CompoundTypesIntegrationTest.java   |  14 ++-
 .../salesforce/HttpProxyIntegrationTest.java       |  23 ++--
 .../salesforce/LimitsIntegrationTest.java          |  13 ++-
 .../salesforce/NotFoundIntegrationTest.java        |  34 ++----
 .../PlatformEventsConsumerIntegrationTest.java     |   5 +-
 .../camel/component/salesforce/RawPayloadTest.java |  35 +++---
 .../salesforce/RecentIntegrationTest.java          |  15 +--
 .../salesforce/RestApiIntegrationTest.java         | 110 +++++++++---------
 ...eComponentVerifierExtensionIntegrationTest.java |  41 ++++---
 .../SalesforceComponentVerifierExtensionTest.java  |  21 ++--
 .../salesforce/SalesforceConsumerTest.java         |  12 +-
 .../salesforce/SalesforceEndpointTest.java         |  10 +-
 .../SalesforceHeadersIntegrationTest.java          |   2 +-
 ...alesforceJwtBearerTokenFlowIntegrationTest.java |   5 +-
 .../salesforce/SalesforceLoginConfigTest.java      |   4 +-
 .../SalesforceMetaDataExtensionTest.java           |   2 +-
 .../camel/component/salesforce/Standalone.java     |   5 +-
 .../salesforce/StreamingApiIntegrationTest.java    |  25 ++--
 .../api/MultiSelectPicklistJsonTest.java           |   8 +-
 .../salesforce/api/MultiSelectPicklistXmlTest.java |   8 +-
 .../component/salesforce/api/dto/LimitsTest.java   |  21 ++--
 .../salesforce/api/dto/PlatformEventTest.java      |   2 +-
 .../salesforce/api/dto/RecentItemTest.java         |  19 ++-
 .../salesforce/api/dto/RestErrorTest.java          |   4 +-
 .../api/dto/approval/ApprovalRequestTest.java      |  41 ++++---
 .../api/dto/approval/ApprovalRequestsTest.java     |   8 +-
 .../api/dto/approval/ApprovalResultTest.java       |  23 ++--
 .../salesforce/api/dto/approval/ApprovalsTest.java |  27 +++--
 .../api/dto/composite/MapOfMapsConverterTest.java  |   8 +-
 .../dto/composite/SObjectBatchResponseTest.java    |  56 ++++-----
 .../api/dto/composite/SObjectBatchTest.java        |   8 +-
 .../composite/SObjectCompositeResponseTest.java    |   2 +-
 .../api/dto/composite/SObjectCompositeTest.java    |   2 +-
 .../api/dto/composite/SObjectNodeTest.java         |  82 ++++++-------
 .../api/dto/composite/SObjectTreeResponseTest.java |  37 +++---
 .../api/dto/composite/SObjectTreeTest.java         |  14 +--
 .../salesforce/api/utils/JsonUtilsTest.java        |   8 +-
 .../salesforce/api/utils/QueryHelperTest.java      |   2 +-
 .../api/utils/SalesforceTimeFormatsTest.java       |  43 +++----
 .../salesforce/api/utils/VersionTest.java          |  22 ++--
 .../salesforce/internal/LoginTokenTest.java        |  12 +-
 .../salesforce/internal/SalesforceSessionTest.java |   8 +-
 .../internal/SessionIntegrationTest.java           |  13 ++-
 .../internal/client/AbstractClientBaseTest.java    |   8 +-
 .../client/DefaultCompositeApiClientTest.java      |   9 +-
 .../AbstractRestProcessorApprovalTest.java         |  14 +--
 .../internal/processor/JsonRestProcessorTest.java  |   2 +-
 .../internal/streaming/ReplayExtensionTest.java    |   4 +-
 .../internal/streaming/SubscriptionHelperTest.java |  30 +++--
 .../camel-salesforce-maven-plugin/pom.xml          |   8 +-
 .../AbstractSalesforceMojoIntegrationTest.java     |   2 +-
 .../maven/CamelSalesforceMojoIntegrationTest.java  |   2 +-
 .../camel/maven/CamelSalesforceMojoOutputTest.java |  24 ++--
 .../org/apache/camel/maven/GenerateMojoTest.java   |   8 +-
 .../camel/maven/HttpProxyMojoIntegrationTest.java  |   8 +-
 .../camel/maven/SchemaMojoIntegrationTest.java     |   8 +-
 components/camel-test-junit5/pom.xml               |  12 +-
 .../camel/test/junit5/params/Parameter.java}       |  14 +--
 .../camel/test/junit5/params/Parameterized.java}   |  19 +--
 .../test/junit5/params/ParameterizedExtension.java | 127 +++++++++++++++++++++
 .../camel/test/junit5/params/Parameters.java}      |  17 +--
 .../org/apache/camel/test/junit5/params/Test.java} |  16 +--
 78 files changed, 846 insertions(+), 710 deletions(-)

diff --git a/components/camel-salesforce/camel-salesforce-component/README.md b/components/camel-salesforce/camel-salesforce-component/README.md
index f1bb76c..1b85ef0 100644
--- a/components/camel-salesforce/camel-salesforce-component/README.md
+++ b/components/camel-salesforce/camel-salesforce-component/README.md
@@ -96,7 +96,7 @@ This however is run every time when you run the integration tests by issuing fro
 
 If you need any custom fields, Apex classes or other configuration changes done, make sure to download them using the _Salesforce Migration Tool_ and include them in `it/resources/salesforce` directory.
 
-If your tests cannot be run alongside other tests you can use `@Category(Standalone.class)` to mark them as such.
+If your tests cannot be run alongside other tests you can use `@Standalone` to mark them as such.
 
 #### Manual Salesforce instance setup for integration tests
 
diff --git a/components/camel-salesforce/camel-salesforce-component/pom.xml b/components/camel-salesforce/camel-salesforce-component/pom.xml
index e78d31f..120bff1 100644
--- a/components/camel-salesforce/camel-salesforce-component/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-component/pom.xml
@@ -159,7 +159,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -187,7 +192,7 @@
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <artifactId>mockito-junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractApprovalIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractApprovalIntegrationTest.java
index f6d6b24..3b017b2 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractApprovalIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractApprovalIntegrationTest.java
@@ -25,8 +25,8 @@ import java.util.stream.IntStream;
 import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult;
 import org.apache.camel.component.salesforce.api.dto.analytics.reports.QueryRecordsReport;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 
 public abstract class AbstractApprovalIntegrationTest extends AbstractSalesforceTestBase {
 
@@ -42,7 +42,7 @@ public abstract class AbstractApprovalIntegrationTest extends AbstractSalesforce
         this.accountCount = accountCount;
     }
 
-    @Before
+    @BeforeEach
     public void createAccounts() {
         final List<Account> accountsToCreate = IntStream.range(0, accountCount + 1).mapToObj(idx -> {
             final String name = "test-account-" + idx;
@@ -56,12 +56,12 @@ public abstract class AbstractApprovalIntegrationTest extends AbstractSalesforce
             .map(CreateSObjectResult::getId).collect(Collectors.toList());
     }
 
-    @After
+    @AfterEach
     public void deleteAccounts() {
         accountIds.forEach(id -> template.sendBody("salesforce:deleteSObject?sObjectName=Account", id));
     }
 
-    @Before
+    @BeforeEach
     public void setupUserId() throws IOException {
         final SalesforceLoginConfig loginConfig = LoginConfigHelper.getLoginConfig();
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractBulkApiTestBase.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractBulkApiTestBase.java
index 96dc881..8377547 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractBulkApiTestBase.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractBulkApiTestBase.java
@@ -20,15 +20,14 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.bulk.BatchInfo;
 import org.apache.camel.component.salesforce.api.dto.bulk.BatchStateEnum;
 import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo;
-import org.junit.experimental.theories.Theories;
-import org.junit.runner.RunWith;
 
-@RunWith(Theories.class)
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
 public abstract class AbstractBulkApiTestBase extends AbstractSalesforceTestBase {
 
     protected JobInfo createJob(JobInfo jobInfo) {
         jobInfo = template().requestBody("direct:createJob", jobInfo, JobInfo.class);
-        assertNotNull("Missing JobId", jobInfo.getId());
+        assertNotNull(jobInfo.getId(), "Missing JobId");
         return jobInfo;
     }
 
@@ -86,8 +85,8 @@ public abstract class AbstractBulkApiTestBase extends AbstractSalesforceTestBase
     protected BatchInfo getBatchInfo(BatchInfo batchInfo) {
         batchInfo = template().requestBody("direct:getBatch", batchInfo, BatchInfo.class);
 
-        assertNotNull("Null batch", batchInfo);
-        assertNotNull("Null batch id", batchInfo.getId());
+        assertNotNull(batchInfo, "Null batch");
+        assertNotNull(batchInfo.getId(), "Null batch id");
 
         return batchInfo;
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractSalesforceTestBase.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractSalesforceTestBase.java
index 7939d39..fa9da6a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractSalesforceTestBase.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AbstractSalesforceTestBase.java
@@ -20,10 +20,14 @@ import java.util.HashMap;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public abstract class AbstractSalesforceTestBase extends CamelTestSupport {
 
+    protected final Logger log = LoggerFactory.getLogger(getClass());
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         // create the test component
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
index e39f7e5..4a82870 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/AnalyticsApiIntegrationTest.java
@@ -33,18 +33,20 @@ import org.apache.camel.component.salesforce.api.dto.analytics.reports.ReportSta
 import org.apache.camel.component.salesforce.api.dto.analytics.reports.SyncReportResults;
 import org.apache.camel.dataformat.csv.CsvDataFormat;
 import org.apache.commons.csv.CSVFormat;
-import org.junit.Test;
-import org.junit.experimental.theories.DataPoints;
-import org.junit.experimental.theories.Theories;
-import org.junit.experimental.theories.Theory;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.fail;
+
 /**
  * Integration test for Salesforce analytics API endpoints.
  */
-@RunWith(Theories.class)
 public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final Logger LOG = LoggerFactory.getLogger(AnalyticsApiIntegrationTest.class);
@@ -64,7 +66,6 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
      * @return test report developer names in test-salesforce-login.properties
      * @throws Exception
      */
-    @DataPoints
     public static String[] getTestReportDeveloperNames() throws Exception {
         return new String[] {TEST_REPORT_NAME};
     }
@@ -74,29 +75,29 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
 
         final List recentReports = template().requestBody("direct:getRecentReports", null, List.class);
 
-        assertNotNull("getRecentReports", recentReports);
-        assertFalse("getRecentReports empty", recentReports.isEmpty());
+        assertNotNull(recentReports, "getRecentReports");
+        assertFalse(recentReports.isEmpty(), "getRecentReports empty");
         LOG.debug("getRecentReports: {}", recentReports);
     }
 
-    @Theory
+    @ParameterizedTest @MethodSource("getTestReportDeveloperNames")
     public void testReport(String reportName) throws Exception {
 
-        log.info("Testing report {}...", reportName);
+        LOG.info("Testing report {}...", reportName);
 
         // get Report Id
         final QueryRecordsReport reports = template().requestBody("direct:queryReport", "SELECT Id FROM Report WHERE DeveloperName='" + reportName + "'", QueryRecordsReport.class);
 
-        assertNotNull("query", reports);
+        assertNotNull(reports, "query");
         final List<Report> reportsRecords = reports.getRecords();
-        assertFalse("Report not found", reportsRecords.isEmpty());
+        assertFalse(reportsRecords.isEmpty(), "Report not found");
         final String testReportId = reportsRecords.get(0).getId();
         assertNotNull(testReportId);
 
         // 1. getReportDescription
         final ReportDescription reportDescription = template().requestBody("direct:getReportDescription", testReportId, ReportDescription.class);
 
-        assertNotNull("getReportDescriptions", reportDescription);
+        assertNotNull(reportDescription, "getReportDescriptions");
         LOG.debug("getReportDescriptions: {}", reportDescription);
         final ReportMetadata testReportMetadata = reportDescription.getReportMetadata();
 
@@ -105,7 +106,7 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
         SyncReportResults reportResults = template().requestBodyAndHeader("direct:executeSyncReport", testReportId, SalesforceEndpointConfig.INCLUDE_DETAILS, Boolean.TRUE,
                                                                           SyncReportResults.class);
 
-        assertNotNull("executeSyncReport", reportResults);
+        assertNotNull(reportResults, "executeSyncReport");
         LOG.debug("executeSyncReport: {}", reportResults);
 
         // execute with metadata
@@ -120,7 +121,7 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
         }
         reportResults = template().requestBodyAndHeaders("direct:executeSyncReport", body, headers, SyncReportResults.class);
 
-        assertNotNull("executeSyncReport with metadata", reportResults);
+        assertNotNull(reportResults, "executeSyncReport with metadata");
         LOG.debug("executeSyncReport with metadata: {}", reportResults);
 
         // 3. executeAsyncReport
@@ -128,7 +129,7 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
         ReportInstance reportInstance = template().requestBodyAndHeader("direct:executeAsyncReport", testReportId, SalesforceEndpointConfig.INCLUDE_DETAILS, true,
                                                                         ReportInstance.class);
 
-        assertNotNull("executeAsyncReport", reportInstance);
+        assertNotNull(reportInstance, "executeAsyncReport");
         LOG.debug("executeAsyncReport: {}", reportInstance);
 
         // execute with metadata
@@ -144,15 +145,15 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
         }
         reportInstance = template().requestBodyAndHeaders("direct:executeAsyncReport", body, headers, ReportInstance.class);
 
-        assertNotNull("executeAsyncReport with metadata", reportInstance);
+        assertNotNull(reportInstance, "executeAsyncReport with metadata");
         LOG.debug("executeAsyncReport with metadata: {}", reportInstance);
         final String testReportInstanceId = reportInstance.getId();
 
         // 4. getReportInstances
         final List reportInstances = template().requestBody("direct:getReportInstances", testReportId, List.class);
 
-        assertNotNull("getReportInstances", reportInstances);
-        assertFalse("getReportInstances empty", reportInstances.isEmpty());
+        assertNotNull(reportInstances, "getReportInstances");
+        assertFalse(reportInstances.isEmpty(), "getReportInstances empty");
         LOG.debug("getReportInstances: {}", reportInstances);
 
         // 5. getReportResults
@@ -175,14 +176,14 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
             }
         }
 
-        assertNotNull("getReportResults", asyncReportResults);
-        assertEquals("getReportResults status", ReportStatusEnum.Success, asyncReportResults.getAttributes().getStatus());
+        assertNotNull(asyncReportResults, "getReportResults");
+        assertEquals(ReportStatusEnum.Success, asyncReportResults.getAttributes().getStatus(), "getReportResults status");
         LOG.debug("getReportResults: {}", asyncReportResults);
 
         // 6. SalesforceReportResultsConverter tests
         // defaults
         String convertResults = template.requestBody("direct:convertResults", asyncReportResults, String.class);
-        assertNotNull("default convertResults", convertResults);
+        assertNotNull(convertResults, "default convertResults");
         LOG.debug("Default options", convertResults);
         LOG.debug("{}", convertResults);
 
@@ -199,14 +200,14 @@ public class AnalyticsApiIntegrationTest extends AbstractSalesforceTestBase {
                 }
             }
 
-            log.debug("Options {} = {}", REPORT_OPTIONS, values);
+            LOG.debug("Options {} = {}", REPORT_OPTIONS, values);
             headers.clear();
             for (int j = 0; j < REPORT_OPTIONS.length; j++) {
                 headers.put(REPORT_OPTIONS[j], values[j]);
             }
             convertResults = template.requestBodyAndHeaders("direct:convertResults", asyncReportResults, headers, String.class);
 
-            assertNotNull("convertResults", convertResults);
+            assertNotNull(convertResults, "convertResults");
             LOG.debug("{}", convertResults);
         }
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalExamplesIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalExamplesIntegrationTest.java
index dc00f87..b0a05a3 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalExamplesIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalExamplesIntegrationTest.java
@@ -23,7 +23,9 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequest;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalResult;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class ApprovalExamplesIntegrationTest extends AbstractApprovalIntegrationTest {
 
@@ -41,7 +43,7 @@ public class ApprovalExamplesIntegrationTest extends AbstractApprovalIntegration
         final ApprovalResult result = template.requestBody("direct:example1", body, ApprovalResult.class);
         // end::example1Usage
 
-        assertNotNull("Result should be received", result);
+        assertNotNull(result, "Result should be received");
     }
 
     @Test
@@ -54,7 +56,7 @@ public class ApprovalExamplesIntegrationTest extends AbstractApprovalIntegration
         final ApprovalResult result = template.requestBody("direct:example2", body, ApprovalResult.class);
         // end::example2Usage
 
-        assertNotNull("Result should be received", result);
+        assertNotNull(result, "Result should be received");
     }
 
     @BindToRegistry("approvalTemplate")
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalIntegrationTest.java
index 0b3cf6c..cf819a6 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ApprovalIntegrationTest.java
@@ -20,24 +20,27 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import com.googlecode.junittoolbox.ParallelParameterized;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequest;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequest.Action;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalResult;
 import org.apache.camel.component.salesforce.api.dto.approval.Approvals;
 import org.apache.camel.component.salesforce.api.dto.approval.Approvals.Info;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 
-@RunWith(ParallelParameterized.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+@Parameterized
 public class ApprovalIntegrationTest extends AbstractApprovalIntegrationTest {
 
-    private final String format;
+    @Parameter
+    private String format;
 
-    public ApprovalIntegrationTest(final String format) {
+    public ApprovalIntegrationTest() {
         super(5);
-        this.format = format;
     }
 
     @Test
@@ -51,9 +54,9 @@ public class ApprovalIntegrationTest extends AbstractApprovalIntegrationTest {
                                                                                  + "&approvalProcessDefinitionNameOrId=Test_Account_Process", format, accountIds.get(0), userId),
                                                                    NOT_USED, ApprovalResult.class);
 
-        assertNotNull("Approval should have resulted in value", approvalResult);
+        assertNotNull(approvalResult, "Approval should have resulted in value");
 
-        assertEquals("There should be one Account waiting approval", 1, approvalResult.size());
+        assertEquals(1, approvalResult.size(), "There should be one Account waiting approval");
 
         assertEquals("Instance status of the item in approval result should be `Pending`", "Pending", approvalResult.iterator().next().getInstanceStatus());
 
@@ -63,14 +66,14 @@ public class ApprovalIntegrationTest extends AbstractApprovalIntegrationTest {
         // supported
         final Approvals approvals = template.requestBody("salesforce:approvals", NOT_USED, Approvals.class);
 
-        assertNotNull("Approvals should be fetched", approvals);
+        assertNotNull(approvals, "Approvals should be fetched");
 
         final List<Info> accountApprovals = approvals.approvalsFor("Account");
-        assertEquals("There should be one Account waiting approval", 1, accountApprovals.size());
+        assertEquals(1, accountApprovals.size(), "There should be one Account waiting approval");
     }
 
     @Test
-    public void shouldSubmitBulkApprovals() {
+    public void shouldSubmitBulkApprovals(String format) {
         final List<ApprovalRequest> approvalRequests = accountIds.stream().map(id -> {
             final ApprovalRequest request = new ApprovalRequest();
             request.setContextId(id);
@@ -87,10 +90,10 @@ public class ApprovalIntegrationTest extends AbstractApprovalIntegrationTest {
                                                                                  + "&approvalProcessDefinitionNameOrId=Test_Account_Process", format, userId),
                                                                    approvalRequests, ApprovalResult.class);
 
-        assertEquals("Should have same number of approval results as requests", approvalRequests.size(), approvalResult.size());
+        assertEquals(approvalRequests.size(), approvalResult.size(), "Should have same number of approval results as requests");
     }
 
-    @Parameters(name = "format = {0}")
+    @Parameters
     public static Iterable<String> formats() {
         return Arrays.asList("JSON", "XML");
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiBatchIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiBatchIntegrationTest.java
index 0e0cff5..48bd522 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiBatchIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiBatchIntegrationTest.java
@@ -28,16 +28,18 @@ import org.apache.camel.component.salesforce.api.dto.bulk.ContentType;
 import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo;
 import org.apache.camel.component.salesforce.api.dto.bulk.OperationEnum;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
-import org.junit.Test;
-import org.junit.experimental.theories.DataPoints;
-import org.junit.experimental.theories.Theory;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class BulkApiBatchIntegrationTest extends AbstractBulkApiTestBase {
 
     private static final String TEST_REQUEST_XML = "/test-request.xml";
     private static final String TEST_REQUEST_CSV = "/test-request.csv";
 
-    @DataPoints
     public static BatchTest[] getBatches() {
         List<BatchTest> result = new ArrayList<>();
         BatchTest test = new BatchTest();
@@ -54,8 +56,7 @@ public class BulkApiBatchIntegrationTest extends AbstractBulkApiTestBase {
         return result.toArray(new BatchTest[result.size()]);
     }
 
-    @Theory
-    @Test
+    @ParameterizedTest @MethodSource("getBatches")
     public void testBatchLifecycle(BatchTest request) throws Exception {
         log.info("Testing Batch lifecycle with {} content", request.contentType);
 
@@ -72,14 +73,14 @@ public class BulkApiBatchIntegrationTest extends AbstractBulkApiTestBase {
         headers.put(SalesforceEndpointConfig.JOB_ID, jobInfo.getId());
         headers.put(SalesforceEndpointConfig.CONTENT_TYPE, jobInfo.getContentType());
         BatchInfo batchInfo = template().requestBodyAndHeaders("direct:createBatch", request.stream, headers, BatchInfo.class);
-        assertNotNull("Null batch", batchInfo);
-        assertNotNull("Null batch id", batchInfo.getId());
+        assertNotNull(batchInfo, "Null batch");
+        assertNotNull(batchInfo.getId(), "Null batch id");
 
         // test getAllBatches
         @SuppressWarnings("unchecked")
         List<BatchInfo> batches = template().requestBody("direct:getAllBatches", jobInfo, List.class);
-        assertNotNull("Null batches", batches);
-        assertFalse("Empty batch list", batches.isEmpty());
+        assertNotNull(batches, "Null batches");
+        assertFalse(batches.isEmpty(), "Empty batch list");
 
         // test getBatch
         batchInfo = batches.get(0);
@@ -87,7 +88,7 @@ public class BulkApiBatchIntegrationTest extends AbstractBulkApiTestBase {
 
         // test getRequest
         InputStream requestStream = template().requestBody("direct:getRequest", batchInfo, InputStream.class);
-        assertNotNull("Null batch request", requestStream);
+        assertNotNull(requestStream, "Null batch request");
 
         // wait for batch to finish
         log.info("Waiting for batch to finish...");
@@ -98,11 +99,11 @@ public class BulkApiBatchIntegrationTest extends AbstractBulkApiTestBase {
             batchInfo = getBatchInfo(batchInfo);
         }
         log.info("Batch finished with state " + batchInfo.getState());
-        assertEquals("Batch did not succeed", BatchStateEnum.COMPLETED, batchInfo.getState());
+        assertEquals(BatchStateEnum.COMPLETED, batchInfo.getState(), "Batch did not succeed");
 
         // test getResults
         InputStream results = template().requestBody("direct:getResults", batchInfo, InputStream.class);
-        assertNotNull("Null batch results", results);
+        assertNotNull(results, "Null batch results");
 
         // close the test job
         template().requestBody("direct:closeJob", jobInfo, JobInfo.class);
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java
index 78a16d6..8d24926 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiIntegrationTest.java
@@ -29,10 +29,11 @@ import org.eclipse.jetty.client.api.Request;
 import org.eclipse.jetty.http.HttpMethod;
 import org.eclipse.jetty.http.HttpStatus;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.Test;
 
-@Category(Standalone.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+@Standalone
 public class BulkApiIntegrationTest extends AbstractBulkApiTestBase {
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiJobIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiJobIntegrationTest.java
index 4834dd3..5849ec2 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiJobIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiJobIntegrationTest.java
@@ -21,28 +21,20 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
 
-import com.googlecode.junittoolbox.ParallelParameterized;
 import org.apache.camel.component.salesforce.api.dto.bulk.ContentType;
 import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo;
 import org.apache.camel.component.salesforce.api.dto.bulk.JobStateEnum;
 import org.apache.camel.component.salesforce.api.dto.bulk.OperationEnum;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
-@RunWith(ParallelParameterized.class)
-public class BulkApiJobIntegrationTest extends AbstractBulkApiTestBase {
-
-    @Parameter(0)
-    public JobInfo jobInfo;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
-    @Parameter(1)
-    public String operationName;
+public class BulkApiJobIntegrationTest extends AbstractBulkApiTestBase {
 
-    @Before
+    @BeforeEach
     public void setupProfileWithHardDelete() throws IOException {
         final SalesforceLoginConfig loginConfig = LoginConfigHelper.getLoginConfig();
 
@@ -50,8 +42,8 @@ public class BulkApiJobIntegrationTest extends AbstractBulkApiTestBase {
                                         SalesforceEndpointConfig.APEX_QUERY_PARAM_PREFIX + "username", loginConfig.getUserName());
     }
 
-    @Test
-    public void testJobLifecycle() throws Exception {
+    @ParameterizedTest @MethodSource("getJobs")
+    public void testJobLifecycle(JobInfo jobInfo, String operationName) throws Exception {
         log.info("Testing Job lifecycle for {} of type {}", jobInfo.getOperation(), jobInfo.getContentType());
 
         // test create
@@ -59,19 +51,18 @@ public class BulkApiJobIntegrationTest extends AbstractBulkApiTestBase {
 
         // test get
         jobInfo = template().requestBody("direct:getJob", jobInfo, JobInfo.class);
-        assertSame("Job should be OPEN", JobStateEnum.OPEN, jobInfo.getState());
+        assertSame(JobStateEnum.OPEN, jobInfo.getState(), "Job should be OPEN");
 
         // test close
         jobInfo = template().requestBody("direct:closeJob", jobInfo, JobInfo.class);
-        assertSame("Job should be CLOSED", JobStateEnum.CLOSED, jobInfo.getState());
+        assertSame(JobStateEnum.CLOSED, jobInfo.getState(), "Job should be CLOSED");
 
         // test abort
         jobInfo = template().requestBody("direct:abortJob", jobInfo, JobInfo.class);
-        assertSame("Job should be ABORTED", JobStateEnum.ABORTED, jobInfo.getState());
+        assertSame(JobStateEnum.ABORTED, jobInfo.getState(), "Job should be ABORTED");
     }
 
     // test jobs for testJobLifecycle
-    @Parameters(name = "operation = {1}")
     public static Iterable<Object[]> getJobs() {
         final List<JobInfo> result = new ArrayList<>();
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiQueryIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiQueryIntegrationTest.java
index bba5de3..da07547 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiQueryIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/BulkApiQueryIntegrationTest.java
@@ -25,19 +25,16 @@ import org.apache.camel.component.salesforce.api.dto.bulk.ContentType;
 import org.apache.camel.component.salesforce.api.dto.bulk.JobInfo;
 import org.apache.camel.component.salesforce.api.dto.bulk.OperationEnum;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
-import org.junit.Test;
-import org.junit.experimental.theories.DataPoints;
-import org.junit.experimental.theories.Theory;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.EnumSource;
 
-public class BulkApiQueryIntegrationTest extends AbstractBulkApiTestBase {
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-    @DataPoints
-    public static ContentType[] getContentTypes() {
-        return new ContentType[] {ContentType.XML, ContentType.CSV};
-    }
+public class BulkApiQueryIntegrationTest extends AbstractBulkApiTestBase {
 
-    @Theory
-    @Test
+    @ParameterizedTest @EnumSource(names = { "XML", "CSV" })
     public void testQueryLifecycle(ContentType contentType) throws Exception {
         log.info("Testing Query lifecycle with {} content", contentType);
 
@@ -50,12 +47,12 @@ public class BulkApiQueryIntegrationTest extends AbstractBulkApiTestBase {
 
         // test createQuery
         BatchInfo batchInfo = template().requestBody("direct:createBatchQuery", jobInfo, BatchInfo.class);
-        assertNotNull("Null batch query", batchInfo);
-        assertNotNull("Null batch query id", batchInfo.getId());
+        assertNotNull(batchInfo, "Null batch query");
+        assertNotNull(batchInfo.getId(), "Null batch query id");
 
         // test getRequest
         InputStream requestStream = template().requestBody("direct:getRequest", batchInfo, InputStream.class);
-        assertNotNull("Null batch request", requestStream);
+        assertNotNull(requestStream, "Null batch request");
 
         // wait for batch to finish
         log.info("Waiting for query batch to finish...");
@@ -66,18 +63,18 @@ public class BulkApiQueryIntegrationTest extends AbstractBulkApiTestBase {
             batchInfo = getBatchInfo(batchInfo);
         }
         log.info("Query finished with state " + batchInfo.getState());
-        assertEquals("Query did not succeed", BatchStateEnum.COMPLETED, batchInfo.getState());
+        assertEquals(BatchStateEnum.COMPLETED, batchInfo.getState(), "Query did not succeed");
 
         // test getQueryResultList
         @SuppressWarnings("unchecked")
         List<String> resultIds = template().requestBody("direct:getQueryResultIds", batchInfo, List.class);
-        assertNotNull("Null query result ids", resultIds);
-        assertFalse("Empty result ids", resultIds.isEmpty());
+        assertNotNull(resultIds, "Null query result ids");
+        assertFalse(resultIds.isEmpty(), "Empty result ids");
 
         // test getQueryResult
         for (String resultId : resultIds) {
             InputStream results = template().requestBodyAndHeader("direct:getQueryResult", batchInfo, SalesforceEndpointConfig.RESULT_ID, resultId, InputStream.class);
-            assertNotNull("Null query result", results);
+            assertNotNull(results, "Null query result");
         }
 
         // close the test job
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java
index 1f12ca9..7f887c5 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/ChangeEventsConsumerIntegrationTest.java
@@ -27,16 +27,18 @@ import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.assertj.core.api.Assertions;
 import org.awaitility.Awaitility;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+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;
 
 /**
  * During integration tests setup, Salesforce has been configured to fire change
  * events for Account objects. This test merely uses some API calls to trigger
  * some change events, and then perform assertion on the received events.
  */
-@Category(Standalone.class)
+@Standalone
 public class ChangeEventsConsumerIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final String ACCOUNT_NAME = "ChangeEventsConsumerIntegrationTest-TestAccount";
@@ -52,7 +54,7 @@ public class ChangeEventsConsumerIntegrationTest extends AbstractSalesforceTestB
         final Account account = new Account();
         account.setName(ACCOUNT_NAME);
         final CreateSObjectResult result = template.requestBody("salesforce:createSObject?sObjectName=Account", account, CreateSObjectResult.class);
-        Assert.assertNotNull(result.getId());
+        assertNotNull(result.getId());
 
         // Trigger an UPDATE event for an Account
         account.setDescription(ACCOUNT_DESCRIPTION);
@@ -67,27 +69,27 @@ public class ChangeEventsConsumerIntegrationTest extends AbstractSalesforceTestB
         });
 
         final Message createEvent = capturedChangeEvents.getExchanges().get(0).getIn();
-        Assert.assertNotNull(createEvent);
-        Assert.assertEquals("CREATE", createEvent.getHeader("CamelSalesforceChangeType"));
+        assertNotNull(createEvent);
+        assertEquals("CREATE", createEvent.getHeader("CamelSalesforceChangeType"));
         final Map<String, Object> createEventBody = createEvent.getBody(Map.class);
-        Assert.assertNotNull(createEventBody);
-        Assert.assertEquals(ACCOUNT_NAME, createEventBody.get("Name"));
-        Assert.assertFalse(createEventBody.containsKey("Description"));
+        assertNotNull(createEventBody);
+        assertEquals(ACCOUNT_NAME, createEventBody.get("Name"));
+        assertFalse(createEventBody.containsKey("Description"));
 
         final Message updateEvent = capturedChangeEvents.getExchanges().get(1).getIn();
-        Assert.assertNotNull(updateEvent);
-        Assert.assertEquals("UPDATE", updateEvent.getHeader("CamelSalesforceChangeType"));
+        assertNotNull(updateEvent);
+        assertEquals("UPDATE", updateEvent.getHeader("CamelSalesforceChangeType"));
         final Map<String, Object> updateEventBody = updateEvent.getBody(Map.class);
-        Assert.assertNotNull(updateEventBody);
-        Assert.assertFalse(updateEventBody.containsKey("Name"));
-        Assert.assertEquals(ACCOUNT_DESCRIPTION, updateEventBody.get("Description"));
+        assertNotNull(updateEventBody);
+        assertFalse(updateEventBody.containsKey("Name"));
+        assertEquals(ACCOUNT_DESCRIPTION, updateEventBody.get("Description"));
 
         final Message deleteEvent = capturedChangeEvents.getExchanges().get(2).getIn();
-        Assert.assertNotNull(deleteEvent);
-        Assert.assertEquals("DELETE", deleteEvent.getHeader("CamelSalesforceChangeType"));
+        assertNotNull(deleteEvent);
+        assertEquals("DELETE", deleteEvent.getHeader("CamelSalesforceChangeType"));
         final Map<String, Object> deleteEventBody = deleteEvent.getBody(Map.class);
-        Assert.assertFalse(deleteEventBody.containsKey("Name"));
-        Assert.assertFalse(deleteEventBody.containsKey("Description"));
+        assertFalse(deleteEventBody.containsKey("Name"));
+        assertFalse(deleteEventBody.containsKey("Description"));
     }
 
     @Override
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiBatchIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiBatchIntegrationTest.java
index ddb019e..0c8fe13 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiBatchIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiBatchIntegrationTest.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 
-import com.googlecode.junittoolbox.ParallelParameterized;
 import com.thoughtworks.xstream.annotations.XStreamImplicit;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
@@ -36,13 +35,19 @@ import org.apache.camel.component.salesforce.api.dto.composite.SObjectBatchRespo
 import org.apache.camel.component.salesforce.api.dto.composite.SObjectBatchResult;
 import org.apache.camel.component.salesforce.api.utils.Version;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Test;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 import org.junit.runners.Parameterized.Parameters;
 
-@RunWith(ParallelParameterized.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+@Parameterized
 public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase {
 
     public static class Accounts extends AbstractQueryRecordsBase {
@@ -61,18 +66,19 @@ public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase
 
     private static final Set<String> VERSIONS = new HashSet<>(Arrays.asList(SalesforceEndpointConfig.DEFAULT_VERSION, "34.0", "36.0", "37.0", "39.0"));
 
+    @Parameter
+    private final String version;
+
     private String accountId;
 
     private final String batchuri;
 
-    private final String version;
-
-    public CompositeApiBatchIntegrationTest(final String format, final String version) {
+    public CompositeApiBatchIntegrationTest(String format, String version) {
         this.version = version;
         batchuri = "salesforce:composite-batch?format=" + format;
     }
 
-    @After
+    @AfterEach
     public void removeRecords() {
         try {
             template.sendBody("salesforce:deleteSObject?sObjectName=Account&sObjectId=" + accountId, null);
@@ -83,7 +89,7 @@ public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase
         template.request("direct:deleteBatchAccounts", null);
     }
 
-    @Before
+    @BeforeEach
     public void setupRecords() {
         final Account account = new Account();
         account.setName("Composite API Batch");
@@ -94,7 +100,7 @@ public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase
     }
 
     @Test
-    public void shouldSubmitBatchUsingCompositeApi() {
+    public void shouldSubmitBatchUsingCompositeApi(String format, String version) {
         final SObjectBatch batch = new SObjectBatch(version);
 
         final Account updates = new Account();
@@ -111,7 +117,7 @@ public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase
 
         final SObjectBatchResponse response = template.requestBody(batchuri, batch, SObjectBatchResponse.class);
 
-        assertNotNull("Response should be provided", response);
+        assertNotNull(response, "Response should be provided");
 
         assertFalse(response.hasErrors());
     }
@@ -384,9 +390,9 @@ public class CompositeApiBatchIntegrationTest extends AbstractSalesforceTestBase
     SObjectBatchResponse testBatch(final SObjectBatch batch) {
         final SObjectBatchResponse response = template.requestBody(batchuri, batch, SObjectBatchResponse.class);
 
-        assertNotNull("Response should be provided", response);
+        assertNotNull(response, "Response should be provided");
 
-        assertFalse("Received errors in: " + response, response.hasErrors());
+        assertFalse(response.hasErrors(), "Received errors in: " + response);
 
         return response;
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
index 5d3b355..57db37d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiIntegrationTest.java
@@ -23,7 +23,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 
-import com.googlecode.junittoolbox.ParallelParameterized;
 import com.thoughtworks.xstream.annotations.XStreamImplicit;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
@@ -35,14 +34,15 @@ import org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeR
 import org.apache.camel.component.salesforce.api.dto.composite.SObjectCompositeResult;
 import org.apache.camel.component.salesforce.api.utils.Version;
 import org.apache.camel.component.salesforce.dto.generated.Account;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 import org.assertj.core.api.Assertions;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 
-@RunWith(ParallelParameterized.class)
+@Parameterized
 public class CompositeApiIntegrationTest extends AbstractSalesforceTestBase {
 
     public static class Accounts extends AbstractQueryRecordsBase {
@@ -61,18 +61,17 @@ public class CompositeApiIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final Set<String> VERSIONS = new HashSet<>(Arrays.asList("38.0", "41.0"));
 
-    private String accountId;
+    @Parameter
+    private String format;
 
-    private final String compositeUri;
+    @Parameter(1)
+    private String version;
 
-    private final String version;
+    private String accountId;
 
-    public CompositeApiIntegrationTest(final String format, final String version) {
-        this.version = version;
-        compositeUri = "salesforce:composite?format=" + format;
-    }
+    private String compositeUri;
 
-    @After
+    @AfterEach
     public void removeRecords() {
         try {
             template.sendBody("salesforce:deleteSObject?sObjectName=Account&sObjectId=" + accountId, null);
@@ -83,8 +82,10 @@ public class CompositeApiIntegrationTest extends AbstractSalesforceTestBase {
         template.request("direct:deleteBatchAccounts", null);
     }
 
-    @Before
+    @BeforeEach
     public void setupRecords() {
+        compositeUri = "salesforce:composite?format=" + format;
+
         final Account account = new Account();
         account.setName("Composite API Batch");
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiTreeIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiTreeIntegrationTest.java
index f74ab99..afe6e5c 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiTreeIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompositeApiTreeIntegrationTest.java
@@ -18,24 +18,23 @@ package org.apache.camel.component.salesforce;
 
 import java.util.Arrays;
 
-import com.googlecode.junittoolbox.ParallelParameterized;
 import org.apache.camel.component.salesforce.api.dto.composite.SObjectTree;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.apache.camel.component.salesforce.dto.generated.Account_IndustryEnum;
 import org.apache.camel.component.salesforce.dto.generated.Asset;
 import org.apache.camel.component.salesforce.dto.generated.Contact;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 
-@RunWith(ParallelParameterized.class)
-public class CompositeApiTreeIntegrationTest extends AbstractSalesforceTestBase {
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
-    private final String format;
+@Parameterized
+public class CompositeApiTreeIntegrationTest extends AbstractSalesforceTestBase {
 
-    public CompositeApiTreeIntegrationTest(final String format) {
-        this.format = format;
-    }
+    @Parameter
+    private String format;
 
     @Test
     public void shouldSubmitTreeUsingCompositeApi() {
@@ -86,17 +85,17 @@ public class CompositeApiTreeIntegrationTest extends AbstractSalesforceTestBase
 
         final SObjectTree response = template.requestBody("salesforce:composite-tree?format=" + format, tree, SObjectTree.class);
 
-        assertNotNull("Response should be provided", response);
+        assertNotNull(response, "Response should be provided");
 
-        assertNotNull("First account should have Id set", simpleAccount.getId());
-        assertNotNull("President of the first account should have Id set", smith.getId());
-        assertNotNull("Vice president of the first account should have Id set", evans.getId());
+        assertNotNull(simpleAccount.getId(), "First account should have Id set");
+        assertNotNull(smith.getId(), "President of the first account should have Id set");
+        assertNotNull(evans.getId(), "Vice president of the first account should have Id set");
 
-        assertNotNull("Second account should have Id set", simpleAccount2.getId());
+        assertNotNull(simpleAccount2.getId(), "Second account should have Id set");
 
-        assertNotNull("Third account should have Id set", simpleAccount3.getId());
-        assertNotNull("Simple contact on third account should have Id set", contact.getId());
-        assertNotNull("Simple asset on the contact of the third account should have Id set", asset.getId());
+        assertNotNull(simpleAccount3.getId(), "Third account should have Id set");
+        assertNotNull(contact.getId(), "Simple contact on third account should have Id set");
+        assertNotNull(asset.getId(), "Simple asset on the contact of the third account should have Id set");
     }
 
     @Parameters(name = "format = {0}")
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java
index d85b0f6..20952a0 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/CompoundTypesIntegrationTest.java
@@ -19,10 +19,14 @@ package org.apache.camel.component.salesforce;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 /**
  * Test support for Salesforce compound data types. This test requires a custom
  * field in the <code>Account</code> object called
@@ -70,7 +74,7 @@ public class CompoundTypesIntegrationTest extends AbstractSalesforceTestBase {
 
         CreateSObjectResult result = template().requestBody("direct:createSObject" + suffix, account, CreateSObjectResult.class);
         assertNotNull(result);
-        assertTrue("Create success", result.getSuccess());
+        assertTrue(result.getSuccess(), "Create success");
         LOG.debug("Create: " + result);
 
         try {
@@ -78,9 +82,9 @@ public class CompoundTypesIntegrationTest extends AbstractSalesforceTestBase {
             // get account with compound fields
             account = template().requestBody("direct:getSObject" + suffix, result.getId(), Account.class);
             assertNotNull(account);
-            assertNotNull("Billing Address", account.getBillingAddress());
-            assertNotNull("Shipping Address", account.getShippingAddress());
-            assertNotNull("Shipping Location", account.getShippingAddress());
+            assertNotNull(account.getBillingAddress(), "Billing Address");
+            assertNotNull(account.getShippingAddress(), "Shipping Address");
+            assertNotNull(account.getShippingAddress(), "Shipping Location");
 
             LOG.debug("Retrieved fields billing address: {}, shipping location: {}", account.getBillingAddress(), account.getShipping_Location__c());
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java
index f631b3a..f332a3f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/HttpProxyIntegrationTest.java
@@ -29,27 +29,28 @@ import javax.servlet.http.HttpServletResponse;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.Version;
 import org.apache.camel.component.salesforce.api.dto.Versions;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 import org.eclipse.jetty.proxy.ConnectHandler;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.util.B64Code;
 import org.eclipse.jetty.util.StringUtil;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.BeforeAll;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.eclipse.jetty.http.HttpHeader.PROXY_AUTHENTICATE;
 import static org.eclipse.jetty.http.HttpHeader.PROXY_AUTHORIZATION;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Test HTTP proxy configuration for Salesforce component.
  */
-@RunWith(Parameterized.class)
+@Parameterized
 public class HttpProxyIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final Logger LOG = LoggerFactory.getLogger(HttpProxyIntegrationTest.class);
@@ -63,8 +64,8 @@ public class HttpProxyIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final AtomicBoolean WENT_THROUGH_PROXY = new AtomicBoolean();
 
-    @Parameter(0)
-    public Consumer<SalesforceComponent> configurationMethod;
+    @Parameter
+    private Consumer<SalesforceComponent> configurationMethod;
 
     @Parameters
     public static Iterable<Consumer<SalesforceComponent>> methods() {
@@ -76,7 +77,7 @@ public class HttpProxyIntegrationTest extends AbstractSalesforceTestBase {
         doTestGetVersions("");
         doTestGetVersions("Xml");
 
-        assertTrue("Should have gone through the test proxy", WENT_THROUGH_PROXY.get());
+        assertTrue(WENT_THROUGH_PROXY.get(), "Should have gone through the test proxy");
     }
 
     @SuppressWarnings("unchecked")
@@ -94,7 +95,7 @@ public class HttpProxyIntegrationTest extends AbstractSalesforceTestBase {
         LOG.debug("Versions: {}", versions);
     }
 
-    @BeforeClass
+    @BeforeAll
     public static void setupServer() throws Exception {
         // start a local HTTP proxy using Jetty server
         server = new Server();
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LimitsIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LimitsIntegrationTest.java
index b51e63d..0dc7d9a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LimitsIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/LimitsIntegrationTest.java
@@ -19,7 +19,10 @@ package org.apache.camel.component.salesforce;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.Limits;
 import org.apache.camel.component.salesforce.api.dto.Limits.Usage;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class LimitsIntegrationTest extends AbstractSalesforceTestBase {
 
@@ -29,7 +32,7 @@ public class LimitsIntegrationTest extends AbstractSalesforceTestBase {
     public void shouldFetchLimitsForOrganization() {
         final Limits limits = template.requestBody("direct:test-limits", NOT_USED, Limits.class);
 
-        assertNotNull("Should fetch limits from Salesforce REST API", limits);
+        assertNotNull(limits, "Should fetch limits from Salesforce REST API");
 
         assertLimitIsFetched("ConcurrentAsyncGetReportInstances", limits.getConcurrentAsyncGetReportInstances());
 
@@ -79,9 +82,9 @@ public class LimitsIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     private static void assertLimitIsFetched(String property, Usage usage) {
-        assertNotNull("Usage for `" + property + "` should be defined", usage);
-        assertNotEquals("Max usage for `" + property + "` should be defined", 0, usage.getMax());
-        assertNotEquals("Remaining usage for `" + property + "` should be defined", 0, usage.getRemaining());
+        assertNotNull(usage, "Usage for `" + property + "` should be defined");
+        assertNotEquals(0, usage.getMax(), "Max usage for `" + property + "` should be defined");
+        assertNotEquals(0, usage.getRemaining(), "Remaining usage for `" + property + "` should be defined");
     }
 
     @Override
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/NotFoundIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/NotFoundIntegrationTest.java
index ac20977..c6b7ea5 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/NotFoundIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/NotFoundIntegrationTest.java
@@ -16,43 +16,33 @@
  */
 package org.apache.camel.component.salesforce;
 
-import java.util.Arrays;
-
-import com.googlecode.junittoolbox.ParallelParameterized;
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.component.salesforce.api.NoSuchSObjectException;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
 
-@RunWith(ParallelParameterized.class)
-public class NotFoundIntegrationTest extends AbstractSalesforceTestBase {
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
-    @Parameter
-    public String format;
+public class NotFoundIntegrationTest extends AbstractSalesforceTestBase {
 
-    @Test
-    public void shouldNotReportNotFoundExceptionFromRestApiIfConfiguredNotTo() {
+    @ParameterizedTest @ValueSource(strings = { "XML", "JSON" })
+    public void shouldNotReportNotFoundExceptionFromRestApiIfConfiguredNotTo(String format) {
         final Account got = template.requestBody("salesforce:getSObjectWithId?sObjectName=Account&sObjectIdName=Name&format=" + format + "&notFoundBehaviour=NULL", "NonExistant",
                                                  Account.class);
 
-        assertNull("Expecting null when `notFoundBehaviour` is set to NULL", got);
+        assertNull(got, "Expecting null when `notFoundBehaviour` is set to NULL");
     }
 
-    @Test
-    public void shouldReportNotFoundExceptionFromRestApi() {
+    @ParameterizedTest @ValueSource(strings = { "XML", "JSON" })
+    public void shouldReportNotFoundExceptionFromRestApi(String format) {
         try {
             template.requestBody("salesforce:getSObjectWithId?sObjectName=Account&sObjectIdName=Name&format=" + format, "NonExistant", Account.class);
             fail("Expecting CamelExecutionException");
         } catch (final CamelExecutionException e) {
-            assertTrue("Expecting the cause of CamelExecutionException to be NoSuchSObjectException", e.getCause() instanceof NoSuchSObjectException);
+            assertTrue(e.getCause() instanceof NoSuchSObjectException, "Expecting the cause of CamelExecutionException to be NoSuchSObjectException");
         }
     }
-
-    @Parameters(name = "{0}")
-    public static Iterable<String> formats() {
-        return Arrays.asList("XML", "JSON");
-    }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java
index 20643e6..7ac52c7 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/PlatformEventsConsumerIntegrationTest.java
@@ -26,12 +26,11 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.PlatformEvent;
 import org.assertj.core.api.Assertions;
 import org.awaitility.Awaitility;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.entry;
 
-@Category(Standalone.class)
+@Standalone
 public class PlatformEventsConsumerIntegrationTest extends AbstractSalesforceTestBase {
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
index e892b1e..d920c48 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RawPayloadTest.java
@@ -29,19 +29,20 @@ import okhttp3.mockwebserver.MockResponse;
 import okhttp3.mockwebserver.MockWebServer;
 import okhttp3.mockwebserver.RecordedRequest;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 import org.eclipse.jetty.http.HttpHeader;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
-
-@Category(Standalone.class)
-@RunWith(Parameterized.class)
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+@Standalone
+@Parameterized
 public class RawPayloadTest extends AbstractSalesforceTestBase {
 
     @Parameter
@@ -82,7 +83,7 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
         context().addComponent("salesforce", component);
     }
 
-    @AfterClass
+    @AfterAll
     public static void shutDownServer() throws IOException {
         // shutdown mock server
         if (server != null) {
@@ -90,7 +91,7 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
         }
     }
 
-    @BeforeClass
+    @BeforeAll
     public static void startServer() throws IOException {
 
         // create mock server
@@ -113,7 +114,7 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
         loginUrl = server.url("");
     }
 
-    @Before
+    @BeforeEach
     public void setupRequestResponse() {
         if (!format.equals(lastFormat)) {
             // expected response and test request
@@ -137,8 +138,8 @@ public class RawPayloadTest extends AbstractSalesforceTestBase {
     @Test
     public void testRestApi() throws Exception {
         final String responseBody = template().requestBodyAndHeaders(endpointUri, requestBody, headers, String.class);
-        assertNotNull("Null response for endpoint " + endpointUri, responseBody);
-        assertEquals("Unexpected response for endpoint " + endpointUri, expectedResponse, responseBody);
+        assertNotNull(responseBody, "Null response for endpoint " + endpointUri);
+        assertEquals(expectedResponse, responseBody, "Unexpected response for endpoint " + endpointUri);
     }
 
     @Override
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java
index 8e679a3..94f8004 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RecentIntegrationTest.java
@@ -25,12 +25,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.salesforce.api.dto.AbstractQueryRecordsBase;
 import org.apache.camel.component.salesforce.api.dto.RecentItem;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
-@Category(Standalone.class)
+import static org.apache.camel.test.junit5.TestSupport.assertListSize;
+
+@Standalone
 public class RecentIntegrationTest extends AbstractSalesforceTestBase {
 
     public static class Accounts extends AbstractQueryRecordsBase {
@@ -49,12 +50,12 @@ public class RecentIntegrationTest extends AbstractSalesforceTestBase {
 
     private static final Object NOT_USED = null;
 
-    @After
+    @AfterEach
     public void deleteRecords() {
         template.sendBody("direct:delete-recent", NOT_USED);
     }
 
-    @Before
+    @BeforeEach
     public void setupTenRecentItems() {
         final List<Account> accounts = IntStream.range(0, 10).mapToObj(RecentIntegrationTest::account).collect(Collectors.toList());
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
index e5181dc..8788a71 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/RestApiIntegrationTest.java
@@ -51,23 +51,27 @@ import org.apache.camel.component.salesforce.dto.generated.QueryRecordsContact;
 import org.apache.camel.component.salesforce.dto.generated.QueryRecordsLine_Item__c;
 import org.apache.camel.component.salesforce.dto.generated.Task;
 import org.apache.camel.support.jsse.SSLContextParameters;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Test;
 import org.eclipse.jetty.client.HttpClient;
 import org.eclipse.jetty.client.api.ContentResponse;
 import org.eclipse.jetty.client.api.Request;
 import org.eclipse.jetty.http.HttpMethod;
 import org.eclipse.jetty.http.HttpStatus;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
-
-@Category(Standalone.class)
-@RunWith(Parameterized.class)
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+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;
+
+@Standalone
+@Parameterized
 public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
 
     /**
@@ -116,13 +120,13 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     private static final AtomicInteger TEST_LINE_ITEM_ID = new AtomicInteger(1);
 
     @Parameter
-    public String format;
+    protected String format;
 
     private String merchandiseId;
     private String accountId;
     private String contactId;
 
-    @After
+    @AfterEach
     public void removeData() {
         template.request("salesforce:deleteSObject?sObjectName=Merchandise__c&sObjectId=" + merchandiseId, (Processor) e -> {
             // NOOP
@@ -132,7 +136,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         });
     }
 
-    @Before
+    @BeforeEach
     public void setupData() {
         final Merchandise__c merchandise = new Merchandise__c();
         merchandise.setName("Test Merchandise");
@@ -175,7 +179,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testApexCall() throws Exception {
+    public void testApexCall(String format) throws Exception {
         // request merchandise with id in URI template
         Merchandise__c merchandise = template().requestBodyAndHeader("direct:apexCallGet", null, "id", merchandiseId, Merchandise__c.class);
         assertNotNull(merchandise);
@@ -197,7 +201,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testCreateUpdateDelete() throws Exception {
+    public void testCreateUpdateDelete(String format) throws Exception {
         final Merchandise__c merchandise = new Merchandise__c();
         merchandise.setName("Wee Wee Wee Plane");
         merchandise.setDescription__c("Microlite plane");
@@ -205,7 +209,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         merchandise.setTotal_Inventory__c(50.0);
         final CreateSObjectResult result = template().requestBody("direct:createSObject", merchandise, CreateSObjectResult.class);
         assertNotNull(result);
-        assertTrue("Create success", result.getSuccess());
+        assertTrue(result.getSuccess(), "Create success");
 
         // test JSON update
         // make the plane cheaper
@@ -222,14 +226,14 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testRelationshipCreateDelete() throws Exception {
+    public void testRelationshipCreateDelete(String format) throws Exception {
         final Account account = new Account();
         account.setName("Account 1");
         String accountExternalId = UUID.randomUUID().toString();
         account.setExternal_Id__c(accountExternalId);
         final CreateSObjectResult accountResult = template().requestBody("direct:createSObject", account, CreateSObjectResult.class);
         assertNotNull(accountResult);
-        assertTrue("Create success", accountResult.getSuccess());
+        assertTrue(accountResult.getSuccess(), "Create success");
 
         final Account accountRef = new Account();
         accountRef.setExternal_Id__c(accountExternalId);
@@ -238,7 +242,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         contact.setLastName("RelationshipTest");
         final CreateSObjectResult contactResult = template().requestBody("direct:createSObject", contact, CreateSObjectResult.class);
         assertNotNull(contactResult);
-        assertTrue("Create success", contactResult.getSuccess());
+        assertTrue(contactResult.getSuccess(), "Create success");
 
         // delete the Contact
         template().requestBodyAndHeader("direct:deleteSObject", contactResult.getId(), "sObjectName", "Contact");
@@ -248,13 +252,13 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testFieldsToNull() throws Exception {
+    public void testFieldsToNull(String format) throws Exception {
         final Account account = new Account();
         account.setName("Account 1");
         account.setSite("test site");
         final CreateSObjectResult accountResult = template().requestBody("direct:createSObject", account, CreateSObjectResult.class);
         assertNotNull(accountResult);
-        assertTrue("Create success", accountResult.getSuccess());
+        assertTrue(accountResult.getSuccess(), "Create success");
 
         account.setId(accountResult.getId());
         account.setSite(null);
@@ -271,12 +275,12 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testRelationshipUpdate() throws Exception {
+    public void testRelationshipUpdate(String format) throws Exception {
         final Contact contact = new Contact();
         contact.setLastName("RelationshipTest");
         final CreateSObjectResult contactResult = template().requestBody("direct:createSObject", contact, CreateSObjectResult.class);
         assertNotNull(contactResult);
-        assertTrue("Create success", contactResult.getSuccess());
+        assertTrue(contactResult.getSuccess(), "Create success");
 
         final Account account = new Account();
         account.setName("Account 1");
@@ -284,7 +288,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         account.setExternal_Id__c(accountExternalId);
         final CreateSObjectResult accountResult = template().requestBody("direct:createSObject", account, CreateSObjectResult.class);
         assertNotNull(accountResult);
-        assertTrue("Create success", accountResult.getSuccess());
+        assertTrue(accountResult.getSuccess(), "Create success");
 
         final Account accountRef = new Account();
         accountRef.setExternal_Id__c(accountExternalId);
@@ -302,13 +306,13 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testCreateUpdateDeleteTasks() throws Exception {
+    public void testCreateUpdateDeleteTasks(String format) throws Exception {
         final Task taken = new Task();
         taken.setDescription("Task1");
         taken.setActivityDate(ZonedDateTime.of(1700, 1, 2, 3, 4, 5, 6, ZoneId.systemDefault()));
         final CreateSObjectResult result = template().requestBody("direct:createSObject", taken, CreateSObjectResult.class);
         assertNotNull(result);
-        assertTrue("Create success", result.getSuccess());
+        assertTrue(result.getSuccess(), "Create success");
 
         // test JSON update
         // make the plane cheaper
@@ -322,7 +326,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testCreateUpdateDeleteWithId() throws Exception {
+    public void testCreateUpdateDeleteWithId(String format) throws Exception {
         Line_Item__c lineItem = new Line_Item__c();
         final String lineItemId = String.valueOf(TEST_LINE_ITEM_ID.incrementAndGet());
         lineItem.setName(lineItemId);
@@ -360,17 +364,17 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testGetBasicInfo() throws Exception {
+    public void testGetBasicInfo(String format) throws Exception {
         final SObjectBasicInfo objectBasicInfo = template().requestBody("direct:getBasicInfo", null, SObjectBasicInfo.class);
         assertNotNull(objectBasicInfo);
 
         // set test Id for testGetSObject
-        assertFalse("RecentItems is empty", objectBasicInfo.getRecentItems().isEmpty());
+        assertFalse(objectBasicInfo.getRecentItems().isEmpty(), "RecentItems is empty");
         merchandiseId = objectBasicInfo.getRecentItems().get(0).getId();
     }
 
     @Test
-    public void testGetBlobField() throws Exception {
+    public void testGetBlobField(String format) throws Exception {
         // get document with Name "Test Document"
         final HashMap<String, Object> headers = new HashMap<>();
         headers.put(SalesforceEndpointConfig.SOBJECT_NAME, "Document");
@@ -386,28 +390,25 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testGetDescription() throws Exception {
-
+    public void testGetDescription(String format) throws Exception {
         final SObjectDescription sObjectDescription = template().requestBody("direct:getDescription", null, SObjectDescription.class);
         assertNotNull(sObjectDescription);
     }
 
     @Test
-    public void testGetGlobalObjects() throws Exception {
-
+    public void testGetGlobalObjects(String format) throws Exception {
         final GlobalObjects globalObjects = template().requestBody("direct:getGlobalObjects", null, GlobalObjects.class);
         assertNotNull(globalObjects);
     }
 
     @Test
-    public void testGetResources() throws Exception {
-
+    public void testGetResources(String format) throws Exception {
         final RestResources resources = template().requestBody("direct:getResources", null, RestResources.class);
         assertNotNull(resources);
     }
 
     @Test
-    public void testGetSObject() throws Exception {
+    public void testGetSObject(String format) throws Exception {
         final Merchandise__c merchandise = template().requestBody("direct:getSObject", merchandiseId, Merchandise__c.class);
         assertNotNull(merchandise);
 
@@ -416,7 +417,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testGetVersions() throws Exception {
+    public void testGetVersions(String format) throws Exception {
         // test getVersions doesn't need a body
         // assert expected result
         final Object o = template().requestBody("direct:getVersions", (Object)null);
@@ -432,25 +433,25 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testQuery() throws Exception {
+    public void testQuery(String format) throws Exception {
         final QueryRecordsLine_Item__c queryRecords = template().requestBody("direct:query", null, QueryRecordsLine_Item__c.class);
         assertNotNull(queryRecords);
     }
 
     @Test
-    public void testParentRelationshipQuery() throws Exception {
+    public void testParentRelationshipQuery(String format) throws Exception {
         try {
             createAccountAndContact();
             final QueryRecordsContact queryRecords = template().requestBody("direct:parentRelationshipQuery", null, QueryRecordsContact.class);
             Account account = queryRecords.getRecords().get(0).getAccount();
-            assertNotNull("Account was null", account);
+            assertNotNull(account, "Account was null");
         } finally {
             deleteAccountAndContact();
         }
     }
 
     @Test
-    public void testChildRelationshipQuery() throws Exception {
+    public void testChildRelationshipQuery(String format) throws Exception {
         try {
             createAccountAndContact();
             final QueryRecordsAccount queryRecords = template().requestBody("direct:childRelationshipQuery", null, QueryRecordsAccount.class);
@@ -464,13 +465,13 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testQueryAll() throws Exception {
+    public void testQueryAll(String format) throws Exception {
         final QueryRecordsLine_Item__c queryRecords = template().requestBody("direct:queryAll", null, QueryRecordsLine_Item__c.class);
         assertNotNull(queryRecords);
     }
 
     @Test
-    public void testRetry() throws Exception {
+    public void testRetry(String format) throws Exception {
         final SalesforceComponent sf = context().getComponent("salesforce", SalesforceComponent.class);
         final String accessToken = sf.getSession().getAccessToken();
 
@@ -486,11 +487,11 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         final ContentResponse response = logoutGet.send();
         assertEquals(HttpStatus.OK_200, response.getStatus());
 
-        testGetGlobalObjects();
+        testGetGlobalObjects(format);
     }
 
     @Test
-    public void testRetryFailure() throws Exception {
+    public void testRetryFailure(String format) throws Exception {
         final SalesforceComponent sf = context().getComponent("salesforce", SalesforceComponent.class);
         final String accessToken = sf.getSession().getAccessToken();
 
@@ -512,12 +513,12 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         sf.getLoginConfig().setPassword("bad_password");
 
         try {
-            testGetGlobalObjects();
+            testGetGlobalObjects(format);
             fail("Expected CamelExecutionException!");
         } catch (final CamelExecutionException e) {
             if (e.getCause() instanceof SalesforceException) {
                 final SalesforceException cause = (SalesforceException)e.getCause();
-                assertEquals("Expected 400 on authentication retry failure", HttpStatus.BAD_REQUEST_400, cause.getStatusCode());
+                assertEquals(HttpStatus.BAD_REQUEST_400, cause.getStatusCode(), "Expected 400 on authentication retry failure");
             } else {
                 fail("Expected SalesforceException!");
             }
@@ -528,14 +529,14 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testSearch() throws Exception {
+    public void testSearch(String format) throws Exception {
 
         final Object obj = template().requestBody("direct:search", (Object)null);
         assertNotNull(obj);
     }
 
     @Test
-    public void testStatus300() throws Exception {
+    public void testStatus300(String format) throws Exception {
         // get test merchandise
         // note that the header value overrides sObjectFields in endpoint
         final Merchandise__c merchandise = template().requestBodyAndHeader("direct:getSObject", merchandiseId, "sObjectFields", "Name,Description__c,Price__c,Total_Inventory__c",
@@ -576,7 +577,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testStatus400() throws Exception {
+    public void testStatus400(String format) throws Exception {
         // get test merchandise
         // note that the header value overrides sObjectFields in endpoint
         final Merchandise__c merchandise = template().requestBodyAndHeader("direct:getSObject", merchandiseId, "sObjectFields", "Description__c,Price__c", Merchandise__c.class);
@@ -606,7 +607,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testStatus404() {
+    public void testStatus404(String format) throws Exception {
         // try to get a non existent SObject
         try {
             template().requestBody("direct:getSObject", "ILLEGAL_ID", Merchandise__c.class);
@@ -621,7 +622,7 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
     }
 
     @Test
-    public void testFetchingGlobalObjects() {
+    public void testFetchingGlobalObjects(String format) throws Exception {
         final GlobalObjects globalObjects = template().requestBody("salesforce:getGlobalObjects", null, GlobalObjects.class);
 
         assertNotNull(globalObjects);
@@ -713,7 +714,6 @@ public class RestApiIntegrationTest extends AbstractSalesforceTestBase {
         };
     }
 
-    @Parameters(name = "format = {0}")
     public static Iterable<String> parameters() {
         return Arrays.asList("XML", "JSON");
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionIntegrationTest.java
index 5a87262..9d42f20 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionIntegrationTest.java
@@ -22,10 +22,13 @@ import java.util.Map;
 import org.apache.camel.Component;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
 import org.apache.camel.component.salesforce.api.SalesforceException;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.camel.util.ObjectHelper;
-import org.junit.Assert;
-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.assertTrue;
 
 public class SalesforceComponentVerifierExtensionIntegrationTest extends CamelTestSupport {
 
@@ -76,7 +79,7 @@ public class SalesforceComponentVerifierExtensionIntegrationTest extends CamelTe
         Map<String, Object> parameters = getParameters();
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -86,18 +89,18 @@ public class SalesforceComponentVerifierExtensionIntegrationTest extends CamelTe
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(2, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(2, result.getErrors().size());
 
         // Exception
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails()
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertTrue(result.getErrors().get(0).getDetails()
             .get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof SalesforceException);
-        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
 
         // Salesforce Error
-        Assert.assertEquals("invalid_grant", result.getErrors().get(1).getDetail("salesforce_code"));
+        assertEquals("invalid_grant", result.getErrors().get(1).getDetail("salesforce_code"));
     }
 
     @Test
@@ -108,19 +111,19 @@ public class SalesforceComponentVerifierExtensionIntegrationTest extends CamelTe
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(2, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(2, result.getErrors().size());
 
         // Exception
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails()
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertTrue(result.getErrors().get(0).getDetails()
             .get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof SalesforceException);
-        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
 
         // Salesforce Error
-        Assert.assertEquals("invalid_client_id", result.getErrors().get(1).getDetail("salesforce_code"));
+        assertEquals("invalid_client_id", result.getErrors().get(1).getDetail("salesforce_code"));
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionTest.java
index 2ae090b..e7f3a73 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceComponentVerifierExtensionTest.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 SalesforceComponentVerifierExtensionTest extends CamelTestSupport {
 
@@ -53,7 +54,7 @@ public class SalesforceComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = getExtension().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 SalesforceComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -77,11 +78,11 @@ public class SalesforceComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(3, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(3, result.getErrors().size());
 
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(0).getCode());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(1).getCode());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(2).getCode());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(0).getCode());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(1).getCode());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.ILLEGAL_PARAMETER_GROUP_COMBINATION, result.getErrors().get(2).getCode());
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceConsumerTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceConsumerTest.java
index 9d77a8a..be94aea 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceConsumerTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceConsumerTest.java
@@ -32,11 +32,11 @@ import org.apache.camel.spi.ClassResolver;
 import org.cometd.bayeux.Message;
 import org.cometd.bayeux.client.ClientSessionChannel;
 import org.cometd.common.HashMapMessage;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.Mock;
-import org.mockito.junit.MockitoJUnitRunner;
+import org.mockito.junit.jupiter.MockitoSettings;
+import org.mockito.quality.Strictness;
 
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
@@ -47,7 +47,7 @@ import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.verifyNoMoreInteractions;
 import static org.mockito.Mockito.when;
 
-@RunWith(MockitoJUnitRunner.class)
+@MockitoSettings(strictness = Strictness.LENIENT)
 public class SalesforceConsumerTest {
 
     public static class AccountUpdates {
@@ -96,7 +96,7 @@ public class SalesforceConsumerTest {
     @Mock
     private Map<String, Object> mockChangeEventMap;
 
-    @Before
+    @BeforeEach
     public void setupMocks() {
         when(endpoint.getConfiguration()).thenReturn(configuration);
         when(endpoint.createExchange()).thenReturn(exchange);
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceEndpointTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceEndpointTest.java
index 07c3fd0..0b6246a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceEndpointTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceEndpointTest.java
@@ -21,8 +21,9 @@ import java.util.stream.Collectors;
 
 import org.apache.camel.component.salesforce.internal.OperationName;
 import org.apache.camel.spi.UriPath;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
 
 public class SalesforceEndpointTest {
 
@@ -36,9 +37,10 @@ public class SalesforceEndpointTest {
         String[] operationNamesInEnum = Arrays.stream(OperationName.values()).map(OperationName::value).toArray(length -> new String[length]);
         Arrays.sort(operationNamesInEnum);
 
-        Assert.assertArrayEquals("All operation values, the String value returned from OperationName::value, must be defined in the @UriPath "
+        assertArrayEquals(operationNamesInEnum, operationNamesInAnnotation,
+                "All operation values, the String value returned from OperationName::value, must be defined in the @UriPath "
                                  + "enum parameter of the operationName field in SalesforceEndpoint, set the enums parameter to:\n"
-                                 + Arrays.stream(operationNamesInEnum).collect(Collectors.joining(",")), operationNamesInEnum, operationNamesInAnnotation);
+                                 + Arrays.stream(operationNamesInEnum).collect(Collectors.joining(",")));
     }
 
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceHeadersIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceHeadersIntegrationTest.java
index 2692830..91be3af 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceHeadersIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceHeadersIntegrationTest.java
@@ -22,7 +22,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.salesforce.api.dto.GlobalObjects;
 import org.assertj.core.api.Assertions;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class SalesforceHeadersIntegrationTest extends AbstractSalesforceTestBase {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceJwtBearerTokenFlowIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceJwtBearerTokenFlowIntegrationTest.java
index be82b70..010279a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceJwtBearerTokenFlowIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceJwtBearerTokenFlowIntegrationTest.java
@@ -18,10 +18,11 @@ package org.apache.camel.component.salesforce;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.component.salesforce.api.dto.Limits;
-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.Assume.assumeNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class SalesforceJwtBearerTokenFlowIntegrationTest extends CamelTestSupport {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceLoginConfigTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceLoginConfigTest.java
index 2f74c5d..076485d 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceLoginConfigTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceLoginConfigTest.java
@@ -17,9 +17,9 @@
 package org.apache.camel.component.salesforce;
 
 import org.apache.camel.support.jsse.KeyStoreParameters;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SalesforceLoginConfigTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceMetaDataExtensionTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceMetaDataExtensionTest.java
index 00a2f96..3d054be 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceMetaDataExtensionTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/SalesforceMetaDataExtensionTest.java
@@ -36,7 +36,7 @@ import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.camel.component.salesforce.internal.client.RestClient.ResponseCallback;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.mockito.stubbing.Answer;
 
 import static org.assertj.core.api.Assertions.assertThat;
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
index 8cb8c56..3063245 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
@@ -16,10 +16,13 @@
  */
 package org.apache.camel.component.salesforce;
 
+import org.junit.jupiter.api.Tag;
+
 /**
  * JUnit group tag interface for tests that need to be run standalone, i.e. not
  * in parallel with other tests.
  */
-public interface Standalone {
+@Tag("standalone")
+public @interface Standalone {
     // tag interface
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
index 63efb10..69bb3e0 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/StreamingApiIntegrationTest.java
@@ -24,7 +24,12 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.salesforce.api.dto.CreateSObjectResult;
 import org.apache.camel.component.salesforce.dto.generated.Merchandise__c;
 import org.apache.camel.component.salesforce.internal.dto.QueryRecordsPushTopic;
-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;
 
 public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
 
@@ -48,7 +53,7 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
         merchandise.setPrice__c(9.99);
         merchandise.setTotal_Inventory__c(1000.0);
         CreateSObjectResult result = template().requestBody("direct:upsertSObject", merchandise, CreateSObjectResult.class);
-        assertTrue("Merchandise test record not created", result == null || result.getSuccess());
+        assertTrue(result == null || result.getSuccess(), "Merchandise test record not created");
 
         try {
             // wait for Salesforce notification
@@ -56,20 +61,20 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
             final Message in = mock.getExchanges().get(0).getIn();
             merchandise = in.getMandatoryBody(Merchandise__c.class);
 
-            assertNotNull("Missing event body", merchandise);
+            assertNotNull(merchandise, "Missing event body");
             log.info("Merchandise notification: {}", merchandise);
-            assertNotNull("Missing field Id", merchandise.getId());
-            assertNotNull("Missing field Name", merchandise.getName());
+            assertNotNull(merchandise.getId(), "Missing field Id");
+            assertNotNull(merchandise.getName(), "Missing field Name");
 
             // validate dynamic message headers
-            assertNotNull("Missing header CamelSalesforceClientId", in.getHeader("CamelSalesforceClientId"));
-            assertNotNull("Missing header CamelSalesforceEventType", in.getHeader("CamelSalesforceEventType"));
-            assertNotNull("Missing header CamelSalesforceCreatedDate", in.getHeader("CamelSalesforceCreatedDate"));
+            assertNotNull(in.getHeader("CamelSalesforceClientId"), "Missing header CamelSalesforceClientId");
+            assertNotNull(in.getHeader("CamelSalesforceEventType"), "Missing header CamelSalesforceEventType");
+            assertNotNull(in.getHeader("CamelSalesforceCreatedDate"), "Missing header CamelSalesforceCreatedDate");
 
             // validate raw payload message
             rawPayloadMock.assertIsSatisfied();
             final Message inRaw = rawPayloadMock.getExchanges().get(0).getIn();
-            assertTrue("Expected String message body for Raw Payload", inRaw.getBody() instanceof String);
+            assertTrue(inRaw.getBody() instanceof String, "Expected String message body for Raw Payload");
 
         } finally {
             // remove the test record
@@ -78,7 +83,7 @@ public class StreamingApiIntegrationTest extends AbstractSalesforceTestBase {
             // remove the test topic
             // find it using SOQL first
             QueryRecordsPushTopic records = template().requestBody("direct:query", null, QueryRecordsPushTopic.class);
-            assertEquals("Test topic not found", 1, records.getTotalSize());
+            assertEquals(1, records.getTotalSize(), "Test topic not found");
             assertNull(template().requestBody("direct:deleteSObject", records.getRecords().get(0)));
 
         }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistJsonTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistJsonTest.java
index 386c10c..b6c0335 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistJsonTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistJsonTest.java
@@ -20,11 +20,11 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.dto.generated.MSPTest;
 import org.apache.camel.component.salesforce.dto.generated.StringMSPTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class MultiSelectPicklistJsonTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistXmlTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistXmlTest.java
index 90ac5b7..f455c7c 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistXmlTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/MultiSelectPicklistXmlTest.java
@@ -19,11 +19,11 @@ package org.apache.camel.component.salesforce.api;
 import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
 import org.apache.camel.component.salesforce.dto.generated.MSPTest;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class MultiSelectPicklistXmlTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/LimitsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/LimitsTest.java
index e2ca3b9..3a615b8 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/LimitsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/LimitsTest.java
@@ -31,20 +31,19 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.dto.Limits.Usage;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 public class LimitsTest {
 
     @Test
     public void shouldBeKnownIfDefined() {
-        assertFalse("Known usage must not declare itself as unknown", new Usage(1, 2).isUnknown());
+        assertFalse(new Usage(1, 2).isUnknown(), "Known usage must not declare itself as unknown");
     }
 
     @Test
@@ -58,9 +57,9 @@ public class LimitsTest {
         final Limits limits = (Limits)read;
 
         final Usage dailyApiRequests = limits.getDailyApiRequests();
-        assertFalse("Should have some usage present", dailyApiRequests.isUnknown());
-        assertFalse("Per application usage should be present", dailyApiRequests.getPerApplicationUsage().isEmpty());
-        assertNotNull("'Camel Salesman' application usage should be present", dailyApiRequests.forApplication("Camel Salesman"));
+        assertFalse(dailyApiRequests.isUnknown(), "Should have some usage present");
+        assertFalse(dailyApiRequests.getPerApplicationUsage().isEmpty(), "Per application usage should be present");
+        assertNotNull(dailyApiRequests.forApplication("Camel Salesman"), "'Camel Salesman' application usage should be present");
     }
 
     @Test
@@ -93,6 +92,6 @@ public class LimitsTest {
 
     @Test
     public void usageShouldBeUnknownIfUnknown() {
-        assertTrue("Unknown usage must declare itself as such", Usage.UNKNOWN.isUnknown());
+        assertTrue(Usage.UNKNOWN.isUnknown(), "Unknown usage must declare itself as such");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/PlatformEventTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/PlatformEventTest.java
index 1aceff6..7138543 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/PlatformEventTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/PlatformEventTest.java
@@ -21,7 +21,7 @@ import java.time.ZonedDateTime;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.entry;
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RecentItemTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RecentItemTest.java
index eee0185..75ad9be 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RecentItemTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RecentItemTest.java
@@ -21,13 +21,12 @@ import java.io.IOException;
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 public class RecentItemTest {
 
     @Test
@@ -48,15 +47,15 @@ public class RecentItemTest {
 
         final RecentItem recentItem = (RecentItem)read;
 
-        assertEquals("RecentItem.Id should be deserialized", recentItem.getId(), "a06U000000CelH0IAJ");
+        assertEquals("a06U000000CelH0IAJ", recentItem.getId(), "RecentItem.Id should be deserialized");
 
-        assertEquals("RecentItem.Name should be deserialized", recentItem.getName(), "Acme");
+        assertEquals("Acme", recentItem.getName(), "RecentItem.Name should be deserialized");
 
-        assertNotNull("RecentItem.attributes should be deserialized", recentItem.getAttributes());
+        assertNotNull(recentItem.getAttributes(), "RecentItem.attributes should be deserialized");
 
-        assertEquals("RecentItem.attributes.type should be deserialized", recentItem.getAttributes().getType(), "Account");
+        assertEquals("Account", recentItem.getAttributes().getType(), "RecentItem.attributes.type should be deserialized");
 
-        assertEquals("RecentItem.attributes.url should be deserialized", recentItem.getAttributes().getUrl(), "/services/data/v28.0/sobjects/Account/a06U000000CelH0IAJ");
+        assertEquals("/services/data/v28.0/sobjects/Account/a06U000000CelH0IAJ", recentItem.getAttributes().getUrl(), "RecentItem.attributes.url should be deserialized");
 
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RestErrorTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RestErrorTest.java
index d3bbe98..8c0665e 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RestErrorTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/RestErrorTest.java
@@ -23,9 +23,9 @@ import com.fasterxml.jackson.databind.ObjectReader;
 import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class RestErrorTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestTest.java
index 45443c9..d2cfced 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestTest.java
@@ -24,14 +24,13 @@ import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequest.Action;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.CombinableMatcher.both;
 import static org.hamcrest.core.IsNot.not;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-
+import static org.junit.jupiter.api.Assertions.assertEquals;
 public class ApprovalRequestTest {
 
     private final ApprovalRequest sampleRequest;
@@ -65,10 +64,10 @@ public class ApprovalRequestTest {
 
         assertThat("Combined approval request should be a new instance", combined, both(not(sameInstance(request))).and(not(sameInstance(template))));
 
-        assertEquals("Action type should not be overwritten", request.getActionType(), combined.getActionType());
-        assertEquals("Comment should not be overwritten", request.getComments(), combined.getComments());
-        assertEquals("Context id should not be overwritten", request.getContextId(), combined.getContextId());
-        assertEquals("Next approver id should be taken from template", template.getNextApproverIds(), combined.getNextApproverIds());
+        assertEquals(request.getActionType(), combined.getActionType(), "Action type should not be overwritten");
+        assertEquals(request.getComments(), combined.getComments(), "Comment should not be overwritten");
+        assertEquals(request.getContextId(), combined.getContextId(), "Context id should not be overwritten");
+        assertEquals(template.getNextApproverIds(), combined.getNextApproverIds(), "Next approver id should be taken from template");
     }
 
     @Test
@@ -77,11 +76,11 @@ public class ApprovalRequestTest {
 
         final String json = mapper.writerFor(ApprovalRequest.class).writeValueAsString(sampleRequest);
 
-        assertEquals("ApprovalRequest should serialize as JSON from Salesforce examples",
-                     "{\"actionType\":\"Submit\",\"contextActorId\":\"005D00000015rZy\",\"contextId\":\"001D000000I8mIm\""
+        assertEquals("{\"actionType\":\"Submit\",\"contextActorId\":\"005D00000015rZy\",\"contextId\":\"001D000000I8mIm\""
                                                                                           + ",\"comments\":\"this is a test\",\"nextApproverIds\":[\"005D00000015rY9\"],"
                                                                                           + "\"processDefinitionNameOrId\":\"PTO_Request_Process\",\"skipEntryCriteria\":true}",
-                     json);
+                     json,
+                     "ApprovalRequest should serialize as JSON from Salesforce examples");
     }
 
     @Test
@@ -90,16 +89,16 @@ public class ApprovalRequestTest {
 
         final String xml = xStream.toXML(sampleRequest);
 
-        assertEquals("ApprovalRequest should serialize as XML", "<requests>"//
-                                                                + "<actionType>Submit</actionType>"//
-                                                                + "<contextActorId>005D00000015rZy</contextActorId>"//
-                                                                + "<contextId>001D000000I8mIm</contextId>"//
-                                                                + "<comments>this is a test</comments>"//
-                                                                + "<nextApproverIds>005D00000015rY9</nextApproverIds>"//
-                                                                + "<processDefinitionNameOrId>PTO_Request_Process</processDefinitionNameOrId>"//
-                                                                + "<skipEntryCriteria>true</skipEntryCriteria>"//
-                                                                + "</requests>",
-                     xml);
+        assertEquals("<requests>"//
+                + "<actionType>Submit</actionType>"//
+                + "<contextActorId>005D00000015rZy</contextActorId>"//
+                + "<contextId>001D000000I8mIm</contextId>"//
+                + "<comments>this is a test</comments>"//
+                + "<nextApproverIds>005D00000015rY9</nextApproverIds>"//
+                + "<processDefinitionNameOrId>PTO_Request_Process</processDefinitionNameOrId>"//
+                + "<skipEntryCriteria>true</skipEntryCriteria>"//
+                + "</requests>",
+            xml, "ApprovalRequest should serialize as XML");
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestsTest.java
index ba7120f2..1b06b89 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalRequestsTest.java
@@ -24,9 +24,9 @@ import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalRequest.Action;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class ApprovalRequestsTest {
 
@@ -82,7 +82,7 @@ public class ApprovalRequestsTest {
 
         final String serialized = mapper.writerFor(ApprovalRequests.class).writeValueAsString(requests);
 
-        assertEquals("Approval requests should serialize as JSON", json, serialized);
+        assertEquals(json, serialized, "Approval requests should serialize as JSON");
     }
 
     @Test
@@ -112,6 +112,6 @@ public class ApprovalRequestsTest {
 
         final String serialized = xStream.toXML(requests);
 
-        assertEquals("Approval requests should serialize as XML", xml, serialized);
+        assertEquals(xml, serialized, "Approval requests should serialize as XML");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResultTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResultTest.java
index 20b211e..eba630a 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResultTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalResultTest.java
@@ -25,14 +25,13 @@ import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.dto.approval.ApprovalResult.Result;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsCollectionContaining.hasItems;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 public class ApprovalResultTest {
 
     @Test
@@ -79,17 +78,17 @@ public class ApprovalResultTest {
 
     private static void assertResponseReadCorrectly(final ApprovalResult results) {
         final Iterator<Result> resultsIterator = results.iterator();
-        assertTrue("Should deserialize one approval result result", resultsIterator.hasNext());
+        assertTrue(resultsIterator.hasNext(), "Should deserialize one approval result result");
 
         final ApprovalResult.Result result = resultsIterator.next();
 
         assertThat("Should deserialize actorIds", result.getActorIds(), hasItems("0050Y000000u5NOQAY"));
-        assertEquals("Should deserialize entityId", "0010Y000005BYrZQAW", result.getEntityId());
-        assertEquals("Should deserialize instanceId", "04g0Y000000PL53QAG", result.getInstanceId());
-        assertEquals("Should deserialize instanceStatus", "Pending", result.getInstanceStatus());
+        assertEquals("0010Y000005BYrZQAW", result.getEntityId(), "Should deserialize entityId");
+        assertEquals("04g0Y000000PL53QAG", result.getInstanceId(), "Should deserialize instanceId");
+        assertEquals("Pending", result.getInstanceStatus(), "Should deserialize instanceStatus");
         assertThat("Should deserialize newWorkitemIds", result.getNewWorkitemIds(), hasItems("04i0Y000000L0fkQAC"));
-        assertTrue("Should deserialize success", result.isSuccess());
+        assertTrue(result.isSuccess(), "Should deserialize success");
 
-        assertFalse("Should be no more results", resultsIterator.hasNext());
+        assertFalse(resultsIterator.hasNext(), "Should be no more results");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalsTest.java
index ea09c41..5b38e76 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/approval/ApprovalsTest.java
@@ -24,14 +24,13 @@ import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.dto.approval.Approvals.Info;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsInstanceOf.instanceOf;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
-
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 public class ApprovalsTest {
 
     @Test
@@ -55,19 +54,19 @@ public class ApprovalsTest {
         final Approvals approvals = (Approvals)read;
 
         final Map<String, List<Info>> approvalsMap = approvals.getApprovals();
-        assertEquals("Deserialized approvals should have one entry", 1, approvalsMap.size());
+        assertEquals(1, approvalsMap.size(), "Deserialized approvals should have one entry");
 
         final List<Info> accountApprovals = approvalsMap.get("Account");
-        assertNotNull("Deserialized approvals should contain list of `Account` type approvals", accountApprovals);
+        assertNotNull(accountApprovals, "Deserialized approvals should contain list of `Account` type approvals");
 
-        assertEquals("There should be one approval of `Account` type", 1, accountApprovals.size());
+        assertEquals(1, accountApprovals.size(), "There should be one approval of `Account` type");
 
         final Info accountInfo = accountApprovals.get(0);
 
-        assertNull("Deserialized `Account` approval should have null description", accountInfo.getDescription());
-        assertEquals("Deserialized `Account` approval should have defined id", "04aD00000008Py9", accountInfo.getId());
-        assertEquals("Deserialized `Account` approval should have defined name", "Account Approval Process", accountInfo.getName());
-        assertEquals("Deserialized `Account` approval should have defined object", "Account", accountInfo.getObject());
-        assertEquals("Deserialized `Account` approval should have defined sortOrder", 1, accountInfo.getSortOrder());
+        assertNull(accountInfo.getDescription(), "Deserialized `Account` approval should have null description");
+        assertEquals("04aD00000008Py9", accountInfo.getId(), "Deserialized `Account` approval should have defined id");
+        assertEquals("Account Approval Process", accountInfo.getName(), "Deserialized `Account` approval should have defined name");
+        assertEquals("Account", accountInfo.getObject(), "Deserialized `Account` approval should have defined object");
+        assertEquals(1, accountInfo.getSortOrder(), "Deserialized `Account` approval should have defined sortOrder");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/MapOfMapsConverterTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/MapOfMapsConverterTest.java
index a6ec3be..f76c129 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/MapOfMapsConverterTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/MapOfMapsConverterTest.java
@@ -25,14 +25,14 @@ import com.thoughtworks.xstream.converters.Converter;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.xml.XppDomReader;
 import com.thoughtworks.xstream.io.xml.xppdom.XppDom;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 import org.xmlpull.v1.XmlPullParserFactory;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+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 MapOfMapsConverterTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchResponseTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchResponseTest.java
index 5967057..ad3b751 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchResponseTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchResponseTest.java
@@ -24,13 +24,13 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class SObjectBatchResponseTest {
 
@@ -89,19 +89,19 @@ public class SObjectBatchResponseTest {
 
         final SObjectBatchResponse response = (SObjectBatchResponse)xStream.fromXML(xml);
 
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertFalse("It should not have errors", response.hasErrors());
+        assertFalse(response.hasErrors(), "It should not have errors");
 
         final List<SObjectBatchResult> results = response.getResults();
-        assertEquals("It should contain 2 results", 2, results.size());
+        assertEquals(2, results.size(), "It should contain 2 results");
 
         final SObjectBatchResult firstResult = results.get(0);
-        assertEquals("First result should have status code of 204", 204, firstResult.getStatusCode());
-        assertTrue("First result contain no data", ((Map)firstResult.getResult()).isEmpty());
+        assertEquals(204, firstResult.getStatusCode(), "First result should have status code of 204");
+        assertTrue(((Map)firstResult.getResult()).isEmpty(), "First result contain no data");
 
         final SObjectBatchResult secondResult = results.get(1);
-        assertEquals("Second result should have status code of 200", 200, secondResult.getStatusCode());
+        assertEquals(200, secondResult.getStatusCode(), "Second result should have status code of 200");
 
         @SuppressWarnings("unchecked")
         final Map<String, Object> secondResultMap = (Map<String, Object>)secondResult.getResult();
@@ -110,39 +110,39 @@ public class SObjectBatchResponseTest {
 
         @SuppressWarnings("unchecked")
         final Map<String, String> attributes = (Map<String, String>)account.get("attributes");
-        assertEquals("Second result data should have attribute type set to `Account`", "Account", attributes.get("type"));
-        assertEquals("Second result data should have attribute url set as expected", "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ", attributes.get("url"));
+        assertEquals("Account", attributes.get("type"), "Second result data should have attribute type set to `Account`");
+        assertEquals("/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ", attributes.get("url"), "Second result data should have attribute url set as expected");
 
-        assertEquals("Second result data should have `NewName` set as expected", "NewName", account.get("Name"));
-        assertEquals("Second result data should have `BillingPostalCode` set as expected", "94105", account.get("BillingPostalCode"));
-        assertEquals("Second result data should have `Id` set as expected", "001D000000K0fXOIAZ", account.get("Id"));
+        assertEquals("NewName", account.get("Name"), "Second result data should have `NewName` set as expected");
+        assertEquals("94105", account.get("BillingPostalCode"), "Second result data should have `BillingPostalCode` set as expected");
+        assertEquals("001D000000K0fXOIAZ", account.get("Id"), "Second result data should have `Id` set as expected");
     }
 
     static void assertResponse(final SObjectBatchResponse response) {
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertFalse("It should not have errors", response.hasErrors());
+        assertFalse(response.hasErrors(), "It should not have errors");
 
         final List<SObjectBatchResult> results = response.getResults();
-        assertEquals("It should contain 2 results", 2, results.size());
+        assertEquals(2, results.size(), "It should contain 2 results");
 
         final SObjectBatchResult firstResult = results.get(0);
-        assertEquals("First result should have status code of 204", 204, firstResult.getStatusCode());
-        assertNull("First result contain no data", firstResult.getResult());
+        assertEquals(204, firstResult.getStatusCode(), "First result should have status code of 204");
+        assertNull(firstResult.getResult(), "First result contain no data");
 
         final SObjectBatchResult secondResult = results.get(1);
-        assertEquals("Second result should have status code of 200", 200, secondResult.getStatusCode());
+        assertEquals(200, secondResult.getStatusCode(), "Second result should have status code of 200");
 
         @SuppressWarnings("unchecked")
         final Map<String, Object> secondResultMap = (Map<String, Object>)secondResult.getResult();
         @SuppressWarnings("unchecked")
         final Map<String, String> attributes = (Map<String, String>)secondResultMap.get("attributes");
-        assertEquals("Second result data should have attribute type set to `Account`", "Account", attributes.get("type"));
-        assertEquals("Second result data should have attribute url set as expected", "/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ", attributes.get("url"));
+        assertEquals("Account", attributes.get("type"), "Second result data should have attribute type set to `Account`");
+        assertEquals("/services/data/v34.0/sobjects/Account/001D000000K0fXOIAZ", attributes.get("url"), "Second result data should have attribute url set as expected");
 
-        assertEquals("Second result data should have `NewName` set as expected", "NewName", secondResultMap.get("Name"));
-        assertEquals("Second result data should have `BillingPostalCode` set as expected", "94105", secondResultMap.get("BillingPostalCode"));
-        assertEquals("Second result data should have `Id` set as expected", "001D000000K0fXOIAZ", secondResultMap.get("Id"));
+        assertEquals("NewName", secondResultMap.get("Name"), "Second result data should have `NewName` set as expected");
+        assertEquals("94105", secondResultMap.get("BillingPostalCode"), "Second result data should have `BillingPostalCode` set as expected");
+        assertEquals("001D000000K0fXOIAZ", secondResultMap.get("Id"), "Second result data should have `Id` set as expected");
     }
 
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchTest.java
index 0ec1913..e7413df 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectBatchTest.java
@@ -24,9 +24,9 @@ import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.apache.camel.component.salesforce.dto.generated.Account_IndustryEnum;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SObjectBatchTest {
 
@@ -91,7 +91,7 @@ public class SObjectBatchTest {
                             + "}";
         final ObjectMapper mapper = JsonUtils.createObjectMapper();
         final String serialized = mapper.writerFor(SObjectBatch.class).writeValueAsString(batch);
-        assertEquals("Should serialize as expected by Salesforce", json, serialized);
+        assertEquals(json, serialized, "Should serialize as expected by Salesforce");
     }
 
     @Test
@@ -182,6 +182,6 @@ public class SObjectBatchTest {
 
         final String serialized = xStream.toXML(batch);
 
-        assertEquals("Should serialize as expected by Salesforce", xml, serialized);
+        assertEquals(xml, serialized, "Should serialize as expected by Salesforce");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeResponseTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeResponseTest.java
index c2f883d..7dd2328 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeResponseTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeResponseTest.java
@@ -24,7 +24,7 @@ import java.util.Map;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeTest.java
index a27e4b7..108faa6 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectCompositeTest.java
@@ -29,7 +29,7 @@ import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.apache.camel.component.salesforce.dto.generated.Account_IndustryEnum;
 import org.apache.camel.component.salesforce.dto.generated.Contact;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNodeTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNodeTest.java
index 60a7fd9..274cca0 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNodeTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectNodeTest.java
@@ -21,10 +21,10 @@ import java.util.stream.Stream;
 import org.apache.camel.component.salesforce.api.dto.AbstractSObjectBase;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.apache.camel.component.salesforce.dto.generated.Contact;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 public class SObjectNodeTest extends CompositeTestBase {
 
@@ -42,11 +42,11 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<SObjectNode> children = node.getChildNodesOfType("Contacts");
         final SObjectNode[] childrenAry = toArray(children);
 
-        assertEquals("Size of the node should be 2", 2, node.size());
+        assertEquals(2, node.size(), "Size of the node should be 2");
 
-        assertEquals("There should be one child in this node", 1, childrenAry.length);
+        assertEquals(1, childrenAry.length, "There should be one child in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0].getObject());
+        assertSame(smith, childrenAry[0].getObject(), "First record should be smith contact");
     }
 
     @Test
@@ -59,11 +59,11 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<SObjectNode> children = node.getChildNodesOfType("Contacts");
         final SObjectNode[] childrenAry = toArray(children);
 
-        assertEquals("Size of the node should be 2", 2, node.size());
+        assertEquals(2, node.size(), "Size of the node should be 2");
 
-        assertEquals("There should be one child in this node", 1, childrenAry.length);
+        assertEquals(1, childrenAry.length, "There should be one child in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0].getObject());
+        assertSame(smith, childrenAry[0].getObject(), "First record should be smith contact");
     }
 
     @Test
@@ -77,12 +77,12 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<SObjectNode> children = node.getChildNodes();
         final SObjectNode[] childrenAry = toArray(children);
 
-        assertEquals("There should be two child records in this node", 2, childrenAry.length);
+        assertEquals(2, childrenAry.length, "There should be two child records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0].getObject());
-        assertSame("Second record should be evans contact", evans, childrenAry[1].getObject());
+        assertSame(smith, childrenAry[0].getObject(), "First record should be smith contact");
+        assertSame(evans, childrenAry[1].getObject(), "Second record should be evans contact");
 
-        assertEquals("Size of the node should be 3", 3, node.size());
+        assertEquals(3, node.size(), "Size of the node should be 3");
     }
 
     @Test
@@ -96,12 +96,12 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<AbstractSObjectBase> children = node.getChildren();
         final Object[] childrenAry = children.toArray();
 
-        assertEquals("There should be two child records in this node", 2, childrenAry.length);
+        assertEquals(2, childrenAry.length, "There should be two child records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0]);
-        assertSame("Second record should be evans contact", evans, childrenAry[1]);
+        assertSame(smith, childrenAry[0], "First record should be smith contact");
+        assertSame(evans, childrenAry[1], "Second record should be evans contact");
 
-        assertEquals("Size of the node should be 3", 3, node.size());
+        assertEquals(3, node.size(), "Size of the node should be 3");
     }
 
     @Test
@@ -112,21 +112,21 @@ public class SObjectNodeTest extends CompositeTestBase {
         node.addChild("Contacts", new SObjectNode(tree, smith));
         node.addChild("Contacts", new SObjectNode(tree, evans));
 
-        assertSame("Object in the node should be the given account", simpleAccount, node.getObject());
-        assertEquals("Type of the object in node should be auto-detected", "Account", node.getObjectType());
+        assertSame(simpleAccount, node.getObject(), "Object in the node should be the given account");
+        assertEquals("Account", node.getObjectType(), "Type of the object in node should be auto-detected");
 
         final Stream<SObjectNode> children = node.getChildNodesOfType("Contacts");
         final SObjectNode[] childrenAry = toArray(children);
 
-        assertEquals("There should be two records in this node", 2, childrenAry.length);
+        assertEquals(2, childrenAry.length, "There should be two records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0].getObject());
-        assertEquals("Type of first record should be Contact", "Contact", childrenAry[0].getObjectType());
+        assertSame(smith, childrenAry[0].getObject(), "First record should be smith contact");
+        assertEquals("Contact", childrenAry[0].getObjectType(), "Type of first record should be Contact");
 
-        assertSame("Second record should be evans contact", evans, childrenAry[1].getObject());
-        assertEquals("Type of second record should be Contact", "Contact", childrenAry[1].getObjectType());
+        assertSame(evans, childrenAry[1].getObject(), "Second record should be evans contact");
+        assertEquals("Contact", childrenAry[1].getObjectType(), "Type of second record should be Contact");
 
-        assertEquals("Size of the node should be 3", 3, node.size());
+        assertEquals(3, node.size(), "Size of the node should be 3");
     }
 
     @Test
@@ -144,12 +144,12 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<SObjectNode> children = node.getChildNodesOfType("Contacts");
         final SObjectNode[] childrenAry = toArray(children);
 
-        assertEquals("There should be two records in this node", 2, childrenAry.length);
+        assertEquals(2, childrenAry.length, "There should be two records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0].getObject());
-        assertSame("Second record should be evans contact", evans, childrenAry[1].getObject());
+        assertSame(smith, childrenAry[0].getObject(), "First record should be smith contact");
+        assertSame(evans, childrenAry[1].getObject(), "Second record should be evans contact");
 
-        assertEquals("Size of the node should be 3", 3, node.size());
+        assertEquals(3, node.size(), "Size of the node should be 3");
     }
 
     @Test
@@ -162,12 +162,12 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<AbstractSObjectBase> children = node.getChildrenOfType("Contacts");
         final Object[] childrenAry = children.toArray();
 
-        assertEquals("There should be two child records in this node", 2, childrenAry.length);
+        assertEquals(2, childrenAry.length, "There should be two child records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0]);
-        assertSame("Second record should be evans contact", evans, childrenAry[1]);
+        assertSame(smith, childrenAry[0], "First record should be smith contact");
+        assertSame(evans, childrenAry[1], "Second record should be evans contact");
 
-        assertEquals("Size of the node should be 3", 3, node.size());
+        assertEquals(3, node.size(), "Size of the node should be 3");
     }
 
     @Test
@@ -181,19 +181,19 @@ public class SObjectNodeTest extends CompositeTestBase {
         final Stream<AbstractSObjectBase> children = node.getChildrenOfType("Contacts");
         final Object[] childrenAry = children.toArray();
 
-        assertEquals("There should be four records in this node", 4, childrenAry.length);
+        assertEquals(4, childrenAry.length, "There should be four records in this node");
 
-        assertSame("First record should be smith contact", smith, childrenAry[0]);
-        assertSame("Second record should be evans contact", evans, childrenAry[1]);
-        assertSame("Third record should be bond contact", bond, childrenAry[2]);
-        assertSame("Fourth record should be moneypeny contact", moneypenny, childrenAry[3]);
+        assertSame(smith, childrenAry[0], "First record should be smith contact");
+        assertSame(evans, childrenAry[1], "Second record should be evans contact");
+        assertSame(bond, childrenAry[2], "Third record should be bond contact");
+        assertSame(moneypenny, childrenAry[3], "Fourth record should be moneypeny contact");
 
-        assertEquals("Size of the node should be 5", 5, node.size());
+        assertEquals(5, node.size(), "Size of the node should be 5");
     }
 
     @Test
     public void typeOfShouldBeBasedOnSimpleClassName() {
-        assertEquals("Type of Account should be 'Account'", "Account", SObjectNode.typeOf(new Account()));
-        assertEquals("Type of Contact should be 'Contact'", "Contact", SObjectNode.typeOf(new Contact()));
+        assertEquals("Account", SObjectNode.typeOf(new Account()), "Type of Account should be 'Account'");
+        assertEquals("Contact", SObjectNode.typeOf(new Contact()), "Type of Contact should be 'Contact'");
     }
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeResponseTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeResponseTest.java
index 0ed4cbe..a4baf9e 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeResponseTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeResponseTest.java
@@ -25,15 +25,14 @@ import com.thoughtworks.xstream.XStream;
 import org.apache.camel.component.salesforce.api.dto.RestError;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsCollectionContaining.hasItems;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
-
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 public class SObjectTreeResponseTest {
 
     @Test
@@ -60,11 +59,11 @@ public class SObjectTreeResponseTest {
         final ObjectReader reader = mapper.readerFor(SObjectTreeResponse.class);
         final SObjectTreeResponse response = reader.readValue(json);
 
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertFalse("`hasErrors` flag should be false", response.hasErrors());
+        assertFalse(response.hasErrors(), "`hasErrors` flag should be false");
 
-        assertEquals("Should read 4 references", 4, response.getResults().size());
+        assertEquals(4, response.getResults().size(), "Should read 4 references");
         assertThat("4 references should be read as expected", response.getResults(), hasItems(new ReferenceId("ref1", "001D000000K0fXOIAZ", Collections.emptyList()), //
                                                                                               new ReferenceId("ref4", "001D000000K0fXPIAZ", Collections.emptyList()), //
                                                                                               new ReferenceId("ref2", "003D000000QV9n2IAD", Collections.emptyList()), //
@@ -90,11 +89,11 @@ public class SObjectTreeResponseTest {
         final ObjectReader reader = mapper.readerFor(SObjectTreeResponse.class);
         final SObjectTreeResponse response = reader.readValue(json);
 
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertTrue("`hasErrors` flag should be true", response.hasErrors());
+        assertTrue(response.hasErrors(), "`hasErrors` flag should be true");
 
-        assertEquals("Should read one reference", 1, response.getResults().size());
+        assertEquals(1, response.getResults().size(), "Should read one reference");
         assertThat("The reference should be read as expected", response.getResults(),
                    hasItems(new ReferenceId("ref2", null, Arrays.asList(new RestError("INVALID_EMAIL_ADDRESS", "Email: invalid email address: 123", Arrays.asList("Email"))))));
     }
@@ -126,11 +125,11 @@ public class SObjectTreeResponseTest {
 
         final SObjectTreeResponse response = (SObjectTreeResponse)xStream.fromXML(xml);
 
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertFalse("`hasErrors` flag should be false", response.hasErrors());
+        assertFalse(response.hasErrors(), "`hasErrors` flag should be false");
 
-        assertEquals("Should read 4 references", 4, response.getResults().size());
+        assertEquals(4, response.getResults().size(), "Should read 4 references");
         assertThat("4 references should be read as expected", response.getResults(), hasItems(new ReferenceId("ref1", "001D000000K0fXOIAZ", Collections.emptyList()), //
                                                                                               new ReferenceId("ref4", "001D000000K0fXPIAZ", Collections.emptyList()), //
                                                                                               new ReferenceId("ref2", "003D000000QV9n2IAD", Collections.emptyList()), //
@@ -155,11 +154,11 @@ public class SObjectTreeResponseTest {
 
         final SObjectTreeResponse response = (SObjectTreeResponse)xStream.fromXML(xml);
 
-        assertNotNull("Response should be parsed", response);
+        assertNotNull(response, "Response should be parsed");
 
-        assertTrue("`hasErrors` flag should be true", response.hasErrors());
+        assertTrue(response.hasErrors(), "`hasErrors` flag should be true");
 
-        assertEquals("Should read one reference", 1, response.getResults().size());
+        assertEquals(1, response.getResults().size(), "Should read one reference");
         assertThat("The reference should be read as expected", response.getResults(),
                    hasItems(new ReferenceId("ref2", null, Arrays.asList(new RestError("INVALID_EMAIL_ADDRESS", "Email: invalid email address: 123", Arrays.asList("Email"))))));
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeTest.java
index e8e0c39..ba6aa40 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/dto/composite/SObjectTreeTest.java
@@ -29,11 +29,11 @@ import org.apache.camel.component.salesforce.api.utils.XStreamUtils;
 import org.apache.camel.component.salesforce.dto.generated.Account;
 import org.apache.camel.component.salesforce.dto.generated.Asset;
 import org.apache.camel.component.salesforce.dto.generated.Contact;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertArrayEquals;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
+import static org.junit.jupiter.api.Assertions.assertArrayEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertSame;
 
 public class SObjectTreeTest extends CompositeTestBase {
 
@@ -80,7 +80,7 @@ public class SObjectTreeTest extends CompositeTestBase {
                                 + "\"referenceId\":\"ref3\"," + "\"type\":\"Contact\"," + "\"url\":null" + "}" + "}" + "]" + "}" + "}," + "{" + "\"Industry\":\"Banking\","
                                 + "\"Name\":\"SampleAccount2\"," + "\"NumberOfEmployees\":100," + "\"Phone\":\"1234567890\"," + "\"Website\":\"www.salesforce2.com\","
                                 + "\"attributes\":{" + "\"referenceId\":\"ref4\"," + "\"type\":\"Account\"," + "\"url\":null" + "}" + "}" + "]" + "}";
-        assertEquals("Should serialize to JSON as in Salesforce example", expected, json);
+        assertEquals(expected, json, "Should serialize to JSON as in Salesforce example");
     }
 
     @Test
@@ -99,7 +99,7 @@ public class SObjectTreeTest extends CompositeTestBase {
 
         final String xml = xStream.toXML(tree);
 
-        assertEquals("Should serialize to XML as in Salesforce example", "<SObjectTreeRequest>"//
+        assertEquals("<SObjectTreeRequest>"//
                                                                          + "<records type=\"Account\" referenceId=\"ref1\">"//
                                                                          + "<Name>SampleAccount</Name>"//
                                                                          + "<Phone>1234567890</Phone>"//
@@ -127,7 +127,7 @@ public class SObjectTreeTest extends CompositeTestBase {
                                                                          + "<NumberOfEmployees>100</NumberOfEmployees>"//
                                                                          + "</records>"//
                                                                          + "</SObjectTreeRequest>",
-                     xml);
+                     xml, "Should serialize to XML as in Salesforce example");
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
index 6a28d3f..cfc1c8f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/JsonUtilsTest.java
@@ -21,13 +21,13 @@ import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
 import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Unit test for {@link JsonUtils}
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/QueryHelperTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/QueryHelperTest.java
index c71e140..4a9918f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/QueryHelperTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/QueryHelperTest.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.salesforce.api.utils;
 
 import org.apache.camel.component.salesforce.api.dto.SObjectField;
 import org.apache.camel.component.salesforce.dto.generated.Account;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/SalesforceTimeFormatsTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/SalesforceTimeFormatsTest.java
index 06ab18a..269798f 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/SalesforceTimeFormatsTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/SalesforceTimeFormatsTest.java
@@ -35,16 +35,12 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.databind.type.TypeFactory;
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.annotations.XStreamAlias;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.MethodSource;
 
 import static java.lang.String.format;
 import static org.assertj.core.api.Assertions.assertThat;
 
-@RunWith(Parameterized.class)
 public class SalesforceTimeFormatsTest {
 
     @XStreamAlias("Dto")
@@ -97,51 +93,39 @@ public class SalesforceTimeFormatsTest {
 
     private static final String XML_FMT = "<Dto><value>%s</value></Dto>";
 
-    @Parameter(0)
-    public DateTransferObject<?> dto;
-
-    @Parameter(1)
-    public String json;
-
-    @Parameter(3)
-    public Class<?> parameterType;
-
-    @Parameter(2)
-    public String xml;
-
     private final ObjectMapper objectMapper = JsonUtils.createObjectMapper();
 
     private final XStream xStream = XStreamUtils.createXStream(DateTransferObject.class);
 
-    @Test
-    public void shouldDeserializeJson() throws IOException {
+    @ParameterizedTest @MethodSource("cases")
+    public void shouldDeserializeJson(DateTransferObject<?> dto, String json, String xml, Class<?> parameterType) throws IOException {
         final JavaType javaType = TypeFactory.defaultInstance().constructParametricType(DateTransferObject.class, parameterType);
 
         final DateTransferObject<?> deserialized = objectMapper.readerFor(javaType).readValue(json);
 
-        assertDeserializationResult(deserialized);
+        assertDeserializationResult(dto, deserialized);
     }
 
-    @Test
-    public void shouldDeserializeXml() {
+    @ParameterizedTest @MethodSource("cases")
+    public void shouldDeserializeXml(DateTransferObject<?> dto, String json, String xml, Class<?> parameterType) {
         xStream.addDefaultImplementation(parameterType, Object.class);
 
         final DateTransferObject<?> deserialized = (DateTransferObject<?>)xStream.fromXML(xml);
 
-        assertDeserializationResult(deserialized);
+        assertDeserializationResult(dto, deserialized);
     }
 
-    @Test
-    public void shouldSerializeJson() throws JsonProcessingException {
+    @ParameterizedTest @MethodSource("cases")
+    public void shouldSerializeJson(DateTransferObject<?> dto, String json, String xml, Class<?> parameterType) throws JsonProcessingException {
         assertThat(objectMapper.writeValueAsString(dto)).isEqualTo(json);
     }
 
-    @Test
-    public void shouldSerializeXml() {
+    @ParameterizedTest @MethodSource("cases")
+    public void shouldSerializeXml(DateTransferObject<?> dto, String json, String xml, Class<?> parameterType) {
         assertThat(xStream.toXML(dto)).isEqualTo(xml);
     }
 
-    private void assertDeserializationResult(final DateTransferObject<?> deserialized) {
+    private void assertDeserializationResult(DateTransferObject<?> dto, final DateTransferObject<?> deserialized) {
         if (dto.value instanceof ZonedDateTime) {
             // Salesforce expresses time in UTC+offset (ISO-8601 , with this we
             // loose time zone information
@@ -154,7 +138,6 @@ public class SalesforceTimeFormatsTest {
         }
     }
 
-    @Parameters
     public static Iterable<Object[]> cases() {
         final LocalDate localDate = LocalDate.of(2007, 03, 19);
         final ZonedDateTime zonedDateTime = ZonedDateTime.of(localDate.atTime(10, 54, 57), ZoneId.of("Z"));
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/VersionTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/VersionTest.java
index dd3402e..7fb30db 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/VersionTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/api/utils/VersionTest.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.salesforce.api.utils;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class VersionTest {
 
@@ -45,18 +45,16 @@ public class VersionTest {
         V35_0.requireAtLeast(34, 0);
     }
 
-    @Test(expected = UnsupportedOperationException.class)
+    @Test
     public void shouldObserveApiLimitsOnMajorVersions() {
-        V35_0.requireAtLeast(36, 0);
-
-        fail("No UnsupportedOperationException thrown, but expected");
+        assertThrows(UnsupportedOperationException.class,
+            () -> V35_0.requireAtLeast(36, 0));
     }
 
-    @Test(expected = UnsupportedOperationException.class)
+    @Test
     public void shouldObserveApiLimitsOnMinorVersions() {
-        V35_0.requireAtLeast(35, 1);
-
-        fail("No UnsupportedOperationException thrown, but expected");
+        assertThrows(UnsupportedOperationException.class,
+            () -> V35_0.requireAtLeast(35, 1));
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
index fd0e8ed..02a5522 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/LoginTokenTest.java
@@ -19,11 +19,11 @@ package org.apache.camel.component.salesforce.internal;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.internal.dto.LoginToken;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class LoginTokenTest {
 
@@ -47,10 +47,10 @@ public class LoginTokenTest {
 
         // assert ObjectMapper deserialized the SF OAuth response and returned a
         // valid token back
-        assertNotNull("An invalid token was returned", token);
+        assertNotNull(token, "An invalid token was returned");
         // assert No exception was thrown during the JSON deserialization
         // process
-        assertNull("Exception was thrown during JSON deserialisation", e);
+        assertNull(e, "Exception was thrown during JSON deserialisation");
         // assert one of the token fields
         assertEquals("false", token.getIsReadOnly());
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SalesforceSessionTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SalesforceSessionTest.java
index 8ea2c8f..806a056 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SalesforceSessionTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SalesforceSessionTest.java
@@ -27,10 +27,10 @@ import org.apache.camel.support.jsse.KeyStoreParameters;
 import org.eclipse.jetty.client.api.ContentResponse;
 import org.eclipse.jetty.client.api.Request;
 import org.eclipse.jetty.http.HttpStatus;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyLong;
 import static org.mockito.ArgumentMatchers.eq;
@@ -58,7 +58,7 @@ public class SalesforceSessionTest {
 
         final String jwtAssertion = session.generateJwtAssertion();
 
-        Assert.assertNotNull(jwtAssertion);
+        assertNotNull(jwtAssertion);
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
index a0d8e41..88aed11 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/SessionIntegrationTest.java
@@ -21,15 +21,16 @@ import org.apache.camel.component.salesforce.SalesforceHttpClient;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.jsse.SSLContextParameters;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 /**
  *
  */
-public class SessionIntegrationTest extends Assert implements SalesforceSession.SalesforceSessionListener {
+public class SessionIntegrationTest implements SalesforceSession.SalesforceSessionListener {
 
     private static final Logger LOG = LoggerFactory.getLogger(SessionIntegrationTest.class);
     private static final int TIMEOUT = 60000;
@@ -53,15 +54,15 @@ public class SessionIntegrationTest extends Assert implements SalesforceSession.
             String loginToken = session.login(session.getAccessToken());
             LOG.info("First token " + loginToken);
 
-            assertTrue("SalesforceSessionListener onLogin NOT called", onLoginTriggered);
+            assertTrue(onLoginTriggered, "SalesforceSessionListener onLogin NOT called");
             onLoginTriggered = false;
 
             // refresh token, also causes logout
             loginToken = session.login(loginToken);
             LOG.info("Refreshed token " + loginToken);
 
-            assertTrue("SalesforceSessionListener onLogout NOT called", onLogoutTriggered);
-            assertTrue("SalesforceSessionListener onLogin NOT called", onLoginTriggered);
+            assertTrue(onLogoutTriggered, "SalesforceSessionListener onLogout NOT called");
+            assertTrue(onLoginTriggered, "SalesforceSessionListener onLogin NOT called");
 
         } finally {
             // logout finally
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBaseTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBaseTest.java
index f09764a..9de5e34 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBaseTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/AbstractClientBaseTest.java
@@ -36,15 +36,15 @@ import org.eclipse.jetty.client.api.Response;
 import org.eclipse.jetty.client.api.Response.CompleteListener;
 import org.eclipse.jetty.client.api.Result;
 import org.eclipse.jetty.http.HttpFields;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.mockito.ArgumentCaptor;
 
 import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
 import static org.assertj.core.api.Assertions.assertThat;
 import static org.assertj.core.api.Assertions.entry;
-import static org.junit.Assert.assertTrue;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 import static org.mockito.Mockito.doNothing;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
@@ -81,7 +81,7 @@ public class AbstractClientBaseTest {
         when(session.getAccessToken()).thenReturn("token");
     }
 
-    @Before
+    @BeforeEach
     public void startClient() throws Exception {
         client.start();
     }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClientTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClientTest.java
index 39e3c80..742c17e 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClientTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/client/DefaultCompositeApiClientTest.java
@@ -18,7 +18,9 @@ package org.apache.camel.component.salesforce.internal.client;
 
 import org.apache.camel.component.salesforce.api.SalesforceException;
 import org.apache.camel.component.salesforce.api.dto.composite.SObjectBatch;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class DefaultCompositeApiClientTest {
 
@@ -33,11 +35,12 @@ public class DefaultCompositeApiClientTest {
         DefaultCompositeApiClient.checkCompositeBatchVersion(V35_0, batch.getVersion());
     }
 
-    @Test(expected = SalesforceException.class)
+    @Test
     public void shouldNotAllowNewerPayloadsWhenConfiguredWithOlderVersion() throws SalesforceException {
         final SObjectBatch batch = new SObjectBatch(V35_0);
 
-        DefaultCompositeApiClient.checkCompositeBatchVersion(V34_0, batch.getVersion());
+        assertThrows(SalesforceException.class,
+            () -> DefaultCompositeApiClient.checkCompositeBatchVersion(V34_0, batch.getVersion()));
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessorApprovalTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessorApprovalTest.java
index 0309218..5724ddf 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessorApprovalTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/AbstractRestProcessorApprovalTest.java
@@ -37,10 +37,10 @@ import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
 import org.apache.camel.support.DefaultMessage;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.fail;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
@@ -141,8 +141,8 @@ public class AbstractRestProcessorApprovalTest {
             sendBodyAndHeader(Collections.EMPTY_LIST, null);
             fail("SalesforceException should be thrown");
         } catch (final SalesforceException e) {
-            assertEquals("Exception should be about not giving a body or a header", "Missing approval parameter in header or ApprovalRequest or List of ApprovalRequests body",
-                         e.getMessage());
+            assertEquals("Missing approval parameter in header or ApprovalRequest or List of ApprovalRequests body",
+                         e.getMessage(), "Exception should be about not giving a body or a header");
         }
     }
 
@@ -152,8 +152,8 @@ public class AbstractRestProcessorApprovalTest {
             sendBodyAndHeader(null, null);
             fail("SalesforceException should be thrown");
         } catch (final SalesforceException e) {
-            assertEquals("Exception should be about not giving a body or a header", "Missing approval parameter in header or ApprovalRequest or List of ApprovalRequests body",
-                         e.getMessage());
+            assertEquals("Missing approval parameter in header or ApprovalRequest or List of ApprovalRequests body",
+                         e.getMessage(), "Exception should be about not giving a body or a header");
         }
     }
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
index 6de8f7c..0d644d0 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/processor/JsonRestProcessorTest.java
@@ -36,7 +36,7 @@ import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
 import org.apache.camel.support.DefaultMessage;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/ReplayExtensionTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/ReplayExtensionTest.java
index 6243d85..4acf1ad 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/ReplayExtensionTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/ReplayExtensionTest.java
@@ -24,9 +24,9 @@ import java.util.concurrent.ConcurrentMap;
 import org.cometd.bayeux.Channel;
 import org.cometd.bayeux.Message;
 import org.cometd.common.HashMapMessage;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class ReplayExtensionTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelperTest.java b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelperTest.java
index cb582d3..988322c 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelperTest.java
+++ b/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/internal/streaming/SubscriptionHelperTest.java
@@ -29,12 +29,12 @@ import org.apache.camel.component.salesforce.SalesforceLoginConfig;
 import org.apache.camel.component.salesforce.api.SalesforceException;
 import org.apache.camel.component.salesforce.internal.SalesforceSession;
 import org.cometd.client.BayeuxClient;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper.determineReplayIdFor;
 import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.verify;
@@ -61,11 +61,11 @@ public class SubscriptionHelperTest {
         when(endpoint.getConfiguration()).thenReturn(config);
         when(component.getConfig()).thenReturn(new SalesforceEndpointConfig());
 
-        assertEquals("Expecting replayId for `my-topic-1` to be 10, as short topic names have priority", Optional.of(10L), determineReplayIdFor(endpoint, "my-topic-1"));
+        assertEquals(Optional.of(10L), determineReplayIdFor(endpoint, "my-topic-1"), "Expecting replayId for `my-topic-1` to be 10, as short topic names have priority");
 
-        assertEquals("Expecting replayId for `my-topic-2` to be 30, the only one given", Optional.of(30L), determineReplayIdFor(endpoint, "my-topic-2"));
+        assertEquals(Optional.of(30L), determineReplayIdFor(endpoint, "my-topic-2"), "Expecting replayId for `my-topic-2` to be 30, the only one given");
 
-        assertEquals("Expecting replayId for `my-topic-3` to be 14, the default", Optional.of(14L), determineReplayIdFor(endpoint, "my-topic-3"));
+        assertEquals(Optional.of(14L), determineReplayIdFor(endpoint, "my-topic-3"), "Expecting replayId for `my-topic-3` to be 14, the default");
     }
 
     @Test
@@ -87,25 +87,21 @@ public class SubscriptionHelperTest {
         when(endpoint.getComponent()).thenReturn(component);
         when(endpoint.getConfiguration()).thenReturn(endpointConfig);
 
-        assertEquals("Expecting replayId for `my-topic-1` to be 5, as endpoint configuration has priority", Optional.of(5L), determineReplayIdFor(endpoint, "my-topic-1"));
+        assertEquals(Optional.of(5L), determineReplayIdFor(endpoint, "my-topic-1"), "Expecting replayId for `my-topic-1` to be 5, as endpoint configuration has priority");
 
-        assertEquals("Expecting replayId for `my-topic-2` to be 3, as endpoint does not configure it", Optional.of(3L), determineReplayIdFor(endpoint, "my-topic-2"));
+        assertEquals(Optional.of(3L), determineReplayIdFor(endpoint, "my-topic-2"), "Expecting replayId for `my-topic-2` to be 3, as endpoint does not configure it");
 
-        assertEquals("Expecting replayId for `my-topic-3` to be 4, as it is endpoint's default", Optional.of(4L), determineReplayIdFor(endpoint, "my-topic-3"));
+        assertEquals(Optional.of(4L), determineReplayIdFor(endpoint, "my-topic-3"), "Expecting replayId for `my-topic-3` to be 4, as it is endpoint's default");
 
         endpointConfig.setDefaultReplayId(null);
 
-        assertEquals("Expecting replayId for `my-topic-3` to be 1, as it is component's default when endpoint does not have a default", Optional.of(1L),
-                     determineReplayIdFor(endpoint, "my-topic-3"));
+        assertEquals(Optional.of(1L), determineReplayIdFor(endpoint, "my-topic-3"), "Expecting replayId for `my-topic-3` to be 1, as it is component's default when endpoint does not have a default");
 
         when(endpoint.getReplayId()).thenReturn(6L);
 
-        assertEquals("Expecting replayId for `my-topic-1` to be 6, as it is endpoint configured explicitly on the endpoint", Optional.of(6L),
-                     determineReplayIdFor(endpoint, "my-topic-1"));
-        assertEquals("Expecting replayId for `my-topic-2` to be 6, as it is endpoint configured explicitly on the endpoint", Optional.of(6L),
-                     determineReplayIdFor(endpoint, "my-topic-2"));
-        assertEquals("Expecting replayId for `my-topic-3` to be 6, as it is endpoint configured explicitly on the endpoint", Optional.of(6L),
-                     determineReplayIdFor(endpoint, "my-topic-3"));
+        assertEquals(Optional.of(6L), determineReplayIdFor(endpoint, "my-topic-1"), "Expecting replayId for `my-topic-1` to be 6, as it is endpoint configured explicitly on the endpoint");
+        assertEquals(Optional.of(6L), determineReplayIdFor(endpoint, "my-topic-2"), "Expecting replayId for `my-topic-2` to be 6, as it is endpoint configured explicitly on the endpoint");
+        assertEquals(Optional.of(6L), determineReplayIdFor(endpoint, "my-topic-3"), "Expecting replayId for `my-topic-3` to be 6, as it is endpoint configured explicitly on the endpoint");
     }
 
     @Test
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
index 0dfe43b..0907a32 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/pom.xml
@@ -177,8 +177,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -188,7 +188,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -211,7 +211,7 @@
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <artifactId>mockito-junit-jupiter</artifactId>
         </dependency>
     </dependencies>
 
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/AbstractSalesforceMojoIntegrationTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/AbstractSalesforceMojoIntegrationTest.java
index c4afc3b..e510b4f 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/AbstractSalesforceMojoIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/AbstractSalesforceMojoIntegrationTest.java
@@ -29,7 +29,7 @@ import org.apache.camel.component.salesforce.SalesforceEndpointConfig;
 import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.assertj.core.api.Assertions.assertThat;
 
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
index 77fc47c..c9ff1ff 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoIntegrationTest.java
@@ -31,7 +31,7 @@ import com.google.testing.compile.Compiler;
 import com.google.testing.compile.JavaFileObjects;
 import org.apache.camel.component.salesforce.SalesforceEndpointConfig;
 import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.junit.rules.TemporaryFolder;
 
 import static org.apache.camel.maven.AbstractSalesforceMojoIntegrationTest.setup;
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
index 4fc6901..70ae04b 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/CamelSalesforceMojoOutputTest.java
@@ -34,25 +34,23 @@ import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
 import org.apache.camel.component.salesforce.internal.client.RestClient;
 import org.apache.camel.component.salesforce.internal.client.RestClient.ResponseCallback;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
-import org.junit.runners.Parameterized.Parameter;
-import org.junit.runners.Parameterized.Parameters;
+import org.junit.jupiter.api.io.TempDir;
 import org.mockito.stubbing.Answer;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.mockito.ArgumentMatchers.any;
 import static org.mockito.ArgumentMatchers.anyMap;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.doAnswer;
 import static org.mockito.Mockito.mock;
 
-@RunWith(Parameterized.class)
+@Parameterized
 public class CamelSalesforceMojoOutputTest {
     private static final String TEST_CALCULATED_FORMULA_FILE = "complex_calculated_formula.json";
     private static final String TEST_CASE_FILE = "case.json";
@@ -72,12 +70,8 @@ public class CamelSalesforceMojoOutputTest {
     @Parameter(2)
     public Set<String> sources;
 
-    @Rule
-    public TemporaryFolder temp = new TemporaryFolder();
-
     @Test
-    public void testProcessDescription() throws Exception {
-        final File pkgDir = temp.newFolder();
+    public void testProcessDescription(@TempDir File pkgDir) throws Exception {
         final GenerateMojo.GeneratorUtility utility = mojo.new GeneratorUtility();
 
         final RestClient client = mockRestClient();
@@ -96,7 +90,7 @@ public class CamelSalesforceMojoOutputTest {
 
             final String expectedContent = IOUtils.toString(CamelSalesforceMojoOutputTest.class.getResource("/generated/" + expected), StandardCharsets.UTF_8);
 
-            Assert.assertEquals("Generated source file in " + source + " must be equal to the one present in test/resources/" + expected, expectedContent, generatedContent);
+            assertEquals(expectedContent, generatedContent, "Generated source file in " + source + " must be equal to the one present in test/resources/" + expected);
         }
     }
 
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/GenerateMojoTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/GenerateMojoTest.java
index 4bce69f..758298f 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/GenerateMojoTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/GenerateMojoTest.java
@@ -20,13 +20,13 @@ import java.util.ArrayList;
 
 import org.apache.camel.component.salesforce.api.dto.SObjectDescription;
 import org.apache.camel.component.salesforce.api.dto.SObjectField;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.hamcrest.CoreMatchers.endsWith;
 import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.assertTrue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class GenerateMojoTest {
 
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/HttpProxyMojoIntegrationTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/HttpProxyMojoIntegrationTest.java
index 1a6c544..5c97479 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/HttpProxyMojoIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/HttpProxyMojoIntegrationTest.java
@@ -20,8 +20,8 @@ import java.io.IOException;
 import java.util.HashMap;
 
 import org.apache.camel.test.AvailablePortFinder;
-import org.junit.After;
-import org.junit.Before;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 import org.littleshoot.proxy.HttpProxyServer;
 import org.littleshoot.proxy.ProxyAuthenticator;
 import org.littleshoot.proxy.impl.DefaultHttpProxyServer;
@@ -38,7 +38,7 @@ public class HttpProxyMojoIntegrationTest extends CamelSalesforceMojoIntegration
 
     private HttpProxyServer proxy;
 
-    @Before
+    @BeforeEach
     public void startProxy() {
         httpProxyPort = AvailablePortFinder.getNextAvailable();
 
@@ -55,7 +55,7 @@ public class HttpProxyMojoIntegrationTest extends CamelSalesforceMojoIntegration
         }).start();
     }
 
-    @After
+    @AfterEach
     public void stopProxy() {
         proxy.stop();
     }
diff --git a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/SchemaMojoIntegrationTest.java b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/SchemaMojoIntegrationTest.java
index cd65b5e..d7e0a4b 100644
--- a/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/SchemaMojoIntegrationTest.java
+++ b/components/camel-salesforce/camel-salesforce-maven-plugin/src/test/java/org/apache/camel/maven/SchemaMojoIntegrationTest.java
@@ -22,12 +22,12 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import com.fasterxml.jackson.module.jsonSchema.JsonSchema;
 import com.fasterxml.jackson.module.jsonSchema.types.ObjectSchema;
 import org.apache.camel.component.salesforce.api.utils.JsonUtils;
-import org.junit.Assert;
 import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.junit.rules.TemporaryFolder;
 
 import static org.apache.camel.maven.AbstractSalesforceMojoIntegrationTest.setup;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class SchemaMojoIntegrationTest {
 
@@ -49,10 +49,10 @@ public class SchemaMojoIntegrationTest {
 
         // validate generated schema
         final File schemaFile = mojo.outputDirectory.toPath().resolve("test-schema.json").toFile();
-        Assert.assertTrue("Output file was not created", schemaFile.exists());
+        assertTrue(schemaFile.exists(), "Output file was not created");
         final ObjectMapper objectMapper = JsonUtils.createObjectMapper();
         final JsonSchema jsonSchema = objectMapper.readValue(schemaFile, JsonSchema.class);
-        Assert.assertTrue("Expected root JSON schema with oneOf element", jsonSchema.isObjectSchema() && !((ObjectSchema)jsonSchema).getOneOf().isEmpty());
+        assertTrue(jsonSchema.isObjectSchema() && !((ObjectSchema)jsonSchema).getOneOf().isEmpty(), "Expected root JSON schema with oneOf element");
     }
 
 }
diff --git a/components/camel-test-junit5/pom.xml b/components/camel-test-junit5/pom.xml
index 3699d04..b035323 100644
--- a/components/camel-test-junit5/pom.xml
+++ b/components/camel-test-junit5/pom.xml
@@ -146,10 +146,14 @@
 			<groupId>org.junit.jupiter</groupId>
 			<artifactId>junit-jupiter-api</artifactId>
 		</dependency>
-		<dependency>
-			<groupId>org.junit.jupiter</groupId>
-			<artifactId>junit-jupiter-engine</artifactId>
-		</dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-engine</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter-params</artifactId>
+        </dependency>
 		<dependency>
 			<groupId>org.apache.logging.log4j</groupId>
 			<artifactId>log4j-slf4j-impl</artifactId>
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameter.java
similarity index 78%
copy from components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
copy to components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameter.java
index 8cb8c56..e5a1fac 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameter.java
@@ -14,12 +14,12 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.salesforce;
+package org.apache.camel.test.junit5.params;
 
-/**
- * JUnit group tag interface for tests that need to be run standalone, i.e. not
- * in parallel with other tests.
- */
-public interface Standalone {
-    // tag interface
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Parameter {
+    int value() default 0;
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameterized.java
similarity index 65%
copy from components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
copy to components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameterized.java
index 8cb8c56..048585b 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameterized.java
@@ -14,12 +14,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.salesforce;
+package org.apache.camel.test.junit5.params;
 
-/**
- * JUnit group tag interface for tests that need to be run standalone, i.e. not
- * in parallel with other tests.
- */
-public interface Standalone {
-    // tag interface
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.junit.jupiter.api.extension.ExtendWith;
+
+@Target({ ElementType.ANNOTATION_TYPE, ElementType.TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+@ExtendWith(ParameterizedExtension.class)
+public @interface Parameterized {
 }
diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/ParameterizedExtension.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/ParameterizedExtension.java
new file mode 100644
index 0000000..62246be
--- /dev/null
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/ParameterizedExtension.java
@@ -0,0 +1,127 @@
+/*
+ * 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.test.junit5.params;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.stream.Collectors;
+
+import org.junit.jupiter.api.extension.Extension;
+import org.junit.jupiter.api.extension.ExtensionContext;
+import org.junit.jupiter.api.extension.TestInstancePostProcessor;
+import org.junit.jupiter.api.extension.TestInstantiationException;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContext;
+import org.junit.jupiter.api.extension.TestTemplateInvocationContextProvider;
+import org.junit.jupiter.params.converter.DefaultArgumentConverter;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.platform.commons.util.CollectionUtils;
+import org.junit.platform.commons.util.ReflectionUtils;
+
+import static org.junit.jupiter.params.provider.Arguments.arguments;
+import static org.junit.platform.commons.util.AnnotationUtils.isAnnotated;
+
+public class ParameterizedExtension implements TestTemplateInvocationContextProvider {
+
+    @Override
+    public boolean supportsTestTemplate(ExtensionContext context) {
+        return context.getTestMethod()
+                .map(m -> isAnnotated(m, Test.class))
+                .orElse(false);
+    }
+
+    @Override
+    public java.util.stream.Stream<TestTemplateInvocationContext> provideTestTemplateInvocationContexts(ExtensionContext extensionContext) {
+        Class<?> testClass = extensionContext.getRequiredTestClass();
+        try {
+            java.util.List<Method> parameters = java.util.stream.Stream.of(testClass.getDeclaredMethods())
+                    .filter(m -> Modifier.isStatic(m.getModifiers()))
+                    .filter(m -> m.getAnnotation(Parameters.class) != null)
+                    .collect(Collectors.toList());
+            if (parameters.size() != 1) {
+                throw new IllegalStateException("Class " + testClass.getName() + " should provide a single method annotated with @" + Parameters.class.getSimpleName());
+            }
+            Object params = parameters.iterator().next().invoke(null);
+            return CollectionUtils.toStream(params)
+                    .map(ParameterizedExtension::toArguments)
+                    .map(Arguments::get)
+                    .map(ParameterizedTemplate::new);
+        } catch (Exception e) {
+            throw new IllegalStateException("Unable to generate test templates for class " + testClass.getName());
+        }
+    }
+
+    private static Arguments toArguments(Object item) {
+        // Nothing to do except cast.
+        if (item instanceof Arguments) {
+            return (Arguments) item;
+        }
+        // Pass all multidimensional arrays "as is", in contrast to Object[].
+        // See https://github.com/junit-team/junit5/issues/1665
+        if (ReflectionUtils.isMultidimensionalArray(item)) {
+            return arguments(item);
+        }
+        // Special treatment for one-dimensional reference arrays.
+        // See https://github.com/junit-team/junit5/issues/1665
+        if (item instanceof Object[]) {
+            return arguments((Object[]) item);
+        }
+        // Pass everything else "as is".
+        return arguments(item);
+    }
+
+    public static class ParameterizedTemplate implements TestTemplateInvocationContext {
+
+        private final Object[] params;
+
+        public ParameterizedTemplate(Object[] params) {
+            this.params = params;
+        }
+
+        @Override
+        public String getDisplayName(int invocationIndex) {
+            return "[" + invocationIndex + "] " + java.util.stream.Stream.of(params).map(Object::toString).collect(Collectors.joining(", "));
+        }
+
+        @Override
+        public java.util.List<Extension> getAdditionalExtensions() {
+            return Arrays.asList(
+                    (TestInstancePostProcessor) this::postProcessTestInstance
+                    );
+        }
+
+        protected void postProcessTestInstance(Object testInstance, ExtensionContext context) throws Exception {
+            Class<?> clazz = testInstance.getClass();
+            java.util.List<Field> fields = java.util.stream.Stream.of(clazz.getDeclaredFields())
+                    .filter(f -> isAnnotated(f, Parameter.class))
+                    .sorted(Comparator.comparing(f -> (Integer) f.getAnnotation(Parameter.class).value()))
+                    .collect(Collectors.toList());
+            if (params.length != fields.size()) {
+                throw new TestInstantiationException("Expected " + fields.size() + " parameters bug got " + params.length + " when instantiating " + clazz.getName());
+            }
+            for (int i = 0; i < fields.size(); i++) {
+                Field f = fields.get(i);
+                f.setAccessible(true);
+                f.set(testInstance, DefaultArgumentConverter.INSTANCE.convert(params[i], f.getType()));
+            }
+        }
+
+    }
+
+}
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameters.java
similarity index 70%
copy from components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
copy to components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameters.java
index 8cb8c56..cabf2e5 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Parameters.java
@@ -14,12 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.salesforce;
+package org.apache.camel.test.junit5.params;
 
-/**
- * JUnit group tag interface for tests that need to be run standalone, i.e. not
- * in parallel with other tests.
- */
-public interface Standalone {
-    // tag interface
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface Parameters {
+    String name() default "{index}";
 }
diff --git a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Test.java
similarity index 76%
copy from components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
copy to components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Test.java
index 8cb8c56..d00bcdc 100644
--- a/components/camel-salesforce/camel-salesforce-component/src/test/java/org/apache/camel/component/salesforce/Standalone.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/params/Test.java
@@ -14,12 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.salesforce;
+package org.apache.camel.test.junit5.params;
 
-/**
- * JUnit group tag interface for tests that need to be run standalone, i.e. not
- * in parallel with other tests.
- */
-public interface Standalone {
-    // tag interface
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+import org.junit.jupiter.api.TestTemplate;
+
+@Retention(RetentionPolicy.RUNTIME)
+@TestTemplate
+public @interface Test {
 }


[camel] 03/18: [CAMEL-11807] Upgrade camel-leveldb to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 831414df0142701e10af0c46ba70dcebfa5f801a
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 13:45:17 2020 +0200

    [CAMEL-11807] Upgrade camel-leveldb to junit5
---
 components/camel-leveldb/leveldb.dat/CURRENT       |   1 +
 components/camel-leveldb/leveldb.dat/LOCK          |   0
 components/camel-leveldb/leveldb.dat/LOG           |   3 +++
 components/camel-leveldb/leveldb.dat/LOG.old       |   1 +
 .../camel-leveldb/leveldb.dat/MANIFEST-000004      | Bin 0 -> 50 bytes
 components/camel-leveldb/pom.xml                   |   6 ++---
 ...elDBAggregateConcurrentDifferentGroupsTest.java |  10 +++++----
 .../LevelDBAggregateConcurrentSameGroupTest.java   |  10 +++++----
 .../LevelDBAggregateDiscardOnTimeoutTest.java      |  10 +++++----
 .../LevelDBAggregateForceCompletionHeaderTest.java |  10 +++++----
 .../LevelDBAggregateLoadAndRecoverTest.java        |  16 ++++++++-----
 .../LevelDBAggregateLoadConcurrentTest.java        |  10 +++++----
 .../leveldb/LevelDBAggregateLoadTest.java          |  10 +++++----
 ...DBAggregateNotLostRemovedWhenConfirmedTest.java |  10 +++++----
 .../leveldb/LevelDBAggregateNotLostTest.java       |  11 +++++----
 ...ggregateRecoverDeadLetterChannelFailedTest.java |  11 +++++----
 ...velDBAggregateRecoverDeadLetterChannelTest.java |  10 +++++----
 .../leveldb/LevelDBAggregateRecoverTest.java       |  10 +++++----
 ...DBAggregateRecoverWithRedeliveryPolicyTest.java |  10 +++++----
 .../LevelDBAggregateRecoverWithSedaTest.java       |  10 +++++----
 .../LevelDBAggregateSerializedHeadersTest.java     |  10 +++++----
 .../component/leveldb/LevelDBAggregateTest.java    |  11 +++++----
 ...velDBAggregateTimeoutCompletionRestartTest.java |  11 +++++----
 .../LevelDBAggregationRepositoryAlotDataTest.java  |  15 ++++++++-----
 ...velDBAggregationRepositoryLoadExistingTest.java |  15 ++++++++-----
 ...velDBAggregationRepositoryMultipleRepoTest.java |  15 ++++++++-----
 ...DBAggregationRepositoryRecoverExistingTest.java |  13 +++++++----
 .../leveldb/LevelDBAggregationRepositoryTest.java  |  15 ++++++++-----
 .../component/leveldb/LevelDBBigPayloadTest.java   |  22 +++++++++++-------
 .../leveldb/LevelDBExchangeSerializationTest.java  |  18 ++++++++++-----
 .../component/leveldb/LevelDBGetNotFoundTest.java  |  25 +++++++++++++--------
 .../camel/component/leveldb/LevelDBSetupTest.java  |   6 +++--
 ...ngAggregateRecoverWithRedeliveryPolicyTest.java |  10 +++++----
 .../leveldb/LevelDBSpringAggregateTest.java        |  10 +++++----
 34 files changed, 221 insertions(+), 134 deletions(-)

diff --git a/components/camel-leveldb/leveldb.dat/CURRENT b/components/camel-leveldb/leveldb.dat/CURRENT
new file mode 100644
index 0000000..cacca75
--- /dev/null
+++ b/components/camel-leveldb/leveldb.dat/CURRENT
@@ -0,0 +1 @@
+MANIFEST-000004
diff --git a/components/camel-leveldb/leveldb.dat/LOCK b/components/camel-leveldb/leveldb.dat/LOCK
new file mode 100644
index 0000000..e69de29
diff --git a/components/camel-leveldb/leveldb.dat/LOG b/components/camel-leveldb/leveldb.dat/LOG
new file mode 100644
index 0000000..a98a285
--- /dev/null
+++ b/components/camel-leveldb/leveldb.dat/LOG
@@ -0,0 +1,3 @@
+2020/07/22-13:45:01.675407 7000081c8000 Recovering log #3
+2020/07/22-13:45:01.676537 7000081c8000 Delete type=0 #3
+2020/07/22-13:45:01.676619 7000081c8000 Delete type=3 #2
diff --git a/components/camel-leveldb/leveldb.dat/LOG.old b/components/camel-leveldb/leveldb.dat/LOG.old
new file mode 100644
index 0000000..de3c694
--- /dev/null
+++ b/components/camel-leveldb/leveldb.dat/LOG.old
@@ -0,0 +1 @@
+2020/07/22-13:44:04.733946 7000100ae000 Delete type=3 #1
diff --git a/components/camel-leveldb/leveldb.dat/MANIFEST-000004 b/components/camel-leveldb/leveldb.dat/MANIFEST-000004
new file mode 100644
index 0000000..0a6e923
Binary files /dev/null and b/components/camel-leveldb/leveldb.dat/MANIFEST-000004 differ
diff --git a/components/camel-leveldb/pom.xml b/components/camel-leveldb/pom.xml
index 099d697..0d061cf 100644
--- a/components/camel-leveldb/pom.xml
+++ b/components/camel-leveldb/pom.xml
@@ -72,7 +72,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -81,8 +81,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentDifferentGroupsTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentDifferentGroupsTest.java
index 66f2789..83753ec 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentDifferentGroupsTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentDifferentGroupsTest.java
@@ -24,14 +24,16 @@ import org.apache.camel.AggregationStrategy;
 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.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateConcurrentDifferentGroupsTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentSameGroupTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentSameGroupTest.java
index 83df9ef..c2cb1d6 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentSameGroupTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateConcurrentSameGroupTest.java
@@ -24,14 +24,16 @@ import org.apache.camel.AggregationStrategy;
 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.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateConcurrentSameGroupTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateDiscardOnTimeoutTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateDiscardOnTimeoutTest.java
index 23acdee..3e341eb 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateDiscardOnTimeoutTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateDiscardOnTimeoutTest.java
@@ -22,16 +22,18 @@ import org.apache.camel.AggregationStrategy;
 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.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateDiscardOnTimeoutTest extends CamelTestSupport {
    
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateForceCompletionHeaderTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateForceCompletionHeaderTest.java
index 3c2f744..7c82b9a 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateForceCompletionHeaderTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateForceCompletionHeaderTest.java
@@ -22,9 +22,11 @@ import java.util.Map;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 /**
  * To test CAMEL-4118 support for completing all aggregation groups with a signal message
@@ -32,7 +34,7 @@ import org.junit.Test;
 public class LevelDBAggregateForceCompletionHeaderTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadAndRecoverTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadAndRecoverTest.java
index ec1f68f..cb2b1b0 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadAndRecoverTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadAndRecoverTest.java
@@ -25,19 +25,23 @@ 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.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 org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class LevelDBAggregateLoadAndRecoverTest extends CamelTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LevelDBAggregateLoadAndRecoverTest.class);
     private static final int SIZE = 200;
     private static AtomicInteger counter = new AtomicInteger();
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp() throws Exception {
         deleteDirectory("target/data");
@@ -77,9 +81,9 @@ public class LevelDBAggregateLoadAndRecoverTest extends CamelTestSupport {
         int expected = SIZE / 10 / 10;
         int delta = Math.abs(expected - recovered);
         if (delta == 0) {
-            assertEquals("There should be " + expected + " recovered", expected, recovered);
+            assertEquals(expected, recovered, "There should be " + expected + " recovered");
         } else {
-            assertTrue("We expected " + expected + " recovered but the delta is within accepted range " + delta, delta < 3);
+            assertTrue(delta < 3, "We expected " + expected + " recovered but the delta is within accepted range " + delta);
         }
     }
 
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadConcurrentTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadConcurrentTest.java
index 5f5cc3f..94f436d 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadConcurrentTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadConcurrentTest.java
@@ -24,19 +24,21 @@ import org.apache.camel.AggregationStrategy;
 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.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 org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+
 public class LevelDBAggregateLoadConcurrentTest extends CamelTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LevelDBAggregateLoadConcurrentTest.class);
     private static final char[] KEYS = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
     private static final int SIZE = 500;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp() throws Exception {
         deleteDirectory("target/data");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadTest.java
index 9adb2fa..e4cdc8e 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateLoadTest.java
@@ -20,19 +20,21 @@ import org.apache.camel.AggregationStrategy;
 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.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 org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+
 public class LevelDBAggregateLoadTest extends CamelTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LevelDBAggregateLoadTest.class);
     private static final int SIZE = 500;
     private LevelDBAggregationRepository repo;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp() throws Exception {
         deleteDirectory("target/data");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostRemovedWhenConfirmedTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostRemovedWhenConfirmedTest.java
index 699356f..81e0f8d 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostRemovedWhenConfirmedTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostRemovedWhenConfirmedTest.java
@@ -21,18 +21,20 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.component.leveldb.LevelDBAggregationRepository.keyBuilder;
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class LevelDBAggregateNotLostRemovedWhenConfirmedTest extends CamelTestSupport {
 
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostTest.java
index 32d5fef..167131b 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateNotLostTest.java
@@ -21,19 +21,22 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.fusesource.hawtbuf.Buffer;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.component.leveldb.LevelDBAggregationRepository.keyBuilder;
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class LevelDBAggregateNotLostTest extends CamelTestSupport {
 
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelFailedTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelFailedTest.java
index 509efa4..a48326a 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelFailedTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelFailedTest.java
@@ -21,16 +21,19 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregateRecoverDeadLetterChannelFailedTest extends CamelTestSupport {
 
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelTest.java
index 951c667..dba74e1 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverDeadLetterChannelTest.java
@@ -21,16 +21,18 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateRecoverDeadLetterChannelTest extends CamelTestSupport {
 
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java
index ceb0e0f..b153fa1 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverTest.java
@@ -23,9 +23,11 @@ import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateRecoverTest extends CamelTestSupport {
 
@@ -33,7 +35,7 @@ public class LevelDBAggregateRecoverTest extends CamelTestSupport {
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithRedeliveryPolicyTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithRedeliveryPolicyTest.java
index 6b4e5ef..fc584a3 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithRedeliveryPolicyTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithRedeliveryPolicyTest.java
@@ -23,9 +23,11 @@ import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateRecoverWithRedeliveryPolicyTest extends CamelTestSupport {
 
@@ -33,7 +35,7 @@ public class LevelDBAggregateRecoverWithRedeliveryPolicyTest extends CamelTestSu
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithSedaTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithSedaTest.java
index 2574924..2be4a85 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithSedaTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateRecoverWithSedaTest.java
@@ -23,9 +23,11 @@ import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBAggregateRecoverWithSedaTest extends CamelTestSupport {
 
@@ -33,7 +35,7 @@ public class LevelDBAggregateRecoverWithSedaTest extends CamelTestSupport {
     private LevelDBAggregationRepository repo;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         repo = new LevelDBAggregationRepository("repo1", "target/data/leveldb.dat");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateSerializedHeadersTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateSerializedHeadersTest.java
index e208f1c..e25fe29 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateSerializedHeadersTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateSerializedHeadersTest.java
@@ -24,19 +24,21 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.util.HeaderDto;
-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 org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+
 public class LevelDBAggregateSerializedHeadersTest extends CamelTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(LevelDBAggregateSerializedHeadersTest.class);
     private static final int SIZE = 500;
     private LevelDBAggregationRepository repo;
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp() throws Exception {
         deleteDirectory("target/data");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTest.java
index e789f82..a756afe 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTest.java
@@ -22,14 +22,17 @@ import org.apache.camel.AggregationStrategy;
 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.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregateTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTimeoutCompletionRestartTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTimeoutCompletionRestartTest.java
index d65972c..35c23a8 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTimeoutCompletionRestartTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregateTimeoutCompletionRestartTest.java
@@ -20,14 +20,17 @@ import org.apache.camel.AggregationStrategy;
 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.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.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregateTimeoutCompletionRestartTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryAlotDataTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryAlotDataTest.java
index 80a11d5..e746f19 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryAlotDataTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryAlotDataTest.java
@@ -20,17 +20,20 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregationRepositoryAlotDataTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -41,7 +44,7 @@ public class LevelDBAggregationRepositoryAlotDataTest extends CamelTestSupport {
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryLoadExistingTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryLoadExistingTest.java
index 78af780..aecb2b7 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryLoadExistingTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryLoadExistingTest.java
@@ -20,17 +20,20 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregationRepositoryLoadExistingTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -41,7 +44,7 @@ public class LevelDBAggregationRepositoryLoadExistingTest extends CamelTestSuppo
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryMultipleRepoTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryMultipleRepoTest.java
index 95bbed0..5b41e19 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryMultipleRepoTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryMultipleRepoTest.java
@@ -20,17 +20,20 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregationRepositoryMultipleRepoTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -41,7 +44,7 @@ public class LevelDBAggregationRepositoryMultipleRepoTest extends CamelTestSuppo
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryRecoverExistingTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryRecoverExistingTest.java
index 3e57ea0..b23aa20 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryRecoverExistingTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryRecoverExistingTest.java
@@ -20,16 +20,21 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 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.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class LevelDBAggregationRepositoryRecoverExistingTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryTest.java
index 2af9689..1ce4c5e 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBAggregationRepositoryTest.java
@@ -20,17 +20,20 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class LevelDBAggregationRepositoryTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -41,7 +44,7 @@ public class LevelDBAggregationRepositoryTest extends CamelTestSupport {
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBigPayloadTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBigPayloadTest.java
index a67cd37..8d2fdf7 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBigPayloadTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBBigPayloadTest.java
@@ -21,22 +21,28 @@ import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.processor.aggregate.UseLatestAggregationStrategy;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Test issue with leveldb file store growing to large
  */
-@Ignore("Run this test manually")
+@Disabled("Run this test manually")
 public class LevelDBBigPayloadTest extends CamelTestSupport {
 
     private static final long TIME = 60 * 1000;
     private static final AtomicLong NUMBER = new AtomicLong();
     private LevelDBAggregationRepository repo;
+    private Logger log = LoggerFactory.getLogger(getClass());
 
-    @Before
+    @BeforeEach
     @Override
     public void setUp() throws Exception {
         deleteDirectory("target/data");
@@ -52,11 +58,11 @@ public class LevelDBBigPayloadTest extends CamelTestSupport {
 
         // assert the file size of the repo is not big < 32mb
         File file = new File("target/data/leveldb.dat");
-        assertTrue(file + " should exists", file.exists());
+        assertTrue(file.exists(), file + " should exists");
         long size = file.length();
         log.info(file + " size is " + size);
         // should be about 32mb, so we say 34 just in case
-        assertTrue(file + " should not be so big in size, was: " + size, size < 34 * 1024 * 1024);
+        assertTrue(size < 34 * 1024 * 1024, file + " should not be so big in size, was: " + size);
     }
 
     @Override
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBExchangeSerializationTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBExchangeSerializationTest.java
index e5ba977..de33ff7 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBExchangeSerializationTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBExchangeSerializationTest.java
@@ -21,17 +21,23 @@ import java.util.Date;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+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;
 
 public class LevelDBExchangeSerializationTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -42,7 +48,7 @@ public class LevelDBExchangeSerializationTest extends CamelTestSupport {
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBGetNotFoundTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBGetNotFoundTest.java
index 2de1974..fbe8c96 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBGetNotFoundTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBGetNotFoundTest.java
@@ -20,17 +20,24 @@ import java.io.File;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
 
 public class LevelDBGetNotFoundTest extends CamelTestSupport {
 
     private LevelDBFile levelDBFile;
+    private Logger log = LoggerFactory.getLogger(getClass());
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
         deleteDirectory("target/data");
@@ -41,7 +48,7 @@ public class LevelDBGetNotFoundTest extends CamelTestSupport {
     }
 
     @Override
-    @After
+    @AfterEach
     public void tearDown() throws Exception {
         levelDBFile.stop();
         super.tearDown();
@@ -57,7 +64,7 @@ public class LevelDBGetNotFoundTest extends CamelTestSupport {
         exchange.getIn().setBody("Hello World");
 
         Exchange out = repo.get(context, exchange.getExchangeId());
-        assertNull("Should not find exchange", out);
+        assertNull(out, "Should not find exchange");
     }
 
     @Test
@@ -72,14 +79,14 @@ public class LevelDBGetNotFoundTest extends CamelTestSupport {
 
         repo.add(context, exchange.getExchangeId(), exchange);
         Exchange out = repo.get(context, exchange.getExchangeId());
-        assertNotNull("Should find exchange", out);
+        assertNotNull(out, "Should find exchange");
 
         Exchange exchange2 = new DefaultExchange(context);
         exchange2.getIn().setBody("Bye World");
         log.info("Created " + exchange2.getExchangeId());
 
         Exchange out2 = repo.get(context, exchange2.getExchangeId());
-        assertNull("Should not find exchange", out2);
+        assertNull(out2, "Should not find exchange");
     }
 
 }
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSetupTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSetupTest.java
index 6e1e4c3..d4a0474 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSetupTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSetupTest.java
@@ -17,8 +17,10 @@
 
 package org.apache.camel.component.leveldb;
 
-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.apache.camel.test.junit5.TestSupport.deleteDirectory;
 
 public class LevelDBSetupTest extends CamelTestSupport {
     /**
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
index 9bc026f..4206e1f 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest.java
@@ -22,12 +22,14 @@ import java.util.concurrent.atomic.AtomicInteger;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+
 public class LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest extends CamelSpringTestSupport {
 
     private static AtomicInteger counter = new AtomicInteger(0);
@@ -38,7 +40,7 @@ public class LevelDBSpringAggregateRecoverWithRedeliveryPolicyTest extends Camel
     }
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();
diff --git a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateTest.java b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateTest.java
index 1898ba0..0da6dab 100644
--- a/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateTest.java
+++ b/components/camel-leveldb/src/test/java/org/apache/camel/component/leveldb/LevelDBSpringAggregateTest.java
@@ -21,16 +21,18 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.AggregationStrategy;
 import org.apache.camel.Exchange;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.spring.CamelSpringTestSupport;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.spring.junit5.CamelSpringTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 import org.springframework.context.support.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.apache.camel.test.junit5.TestSupport.deleteDirectory;
+
 public class LevelDBSpringAggregateTest extends CamelSpringTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         deleteDirectory("target/data");
         super.setUp();


[camel] 02/18: [CAMEL-11807] Upgrade camel-resteasy to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 11bbdda2285c5ec0a9eba186a7b2afc187e5a79a
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 13:36:22 2020 +0200

    [CAMEL-11807] Upgrade camel-resteasy to junit5
---
 components/camel-resteasy/pom.xml                  |  11 +-
 .../test/ResteasyConsumerMatchUriOnPrefix.java     |  20 +-
 .../resteasy/test/ResteasyConsumerProxyTest.java   |  32 ++--
 .../resteasy/test/ResteasyConsumerTest.java        |  69 ++++---
 .../test/ResteasyConsumerTwoServletsTest.java      |  26 ++-
 .../resteasy/test/ResteasyMethodRestrictTest.java  |  22 +--
 .../resteasy/test/ResteasyProducerProxyTest.java   |  68 +++----
 .../resteasy/test/ResteasyProducerTest.java        |  72 ++++----
 .../test/ResteasyRestDSLProxyCamelTest.java        |  20 +-
 .../resteasy/test/ResteasyRestDSLProxyTest.java    |  21 ++-
 .../resteasy/test/ResteasyRestDSLTest.java         |  20 +-
 .../resteasy/test/ResteasySetHttpBindingTest.java  |  16 +-
 .../resteasy/test/ResteasySimpleConsumerTest.java  |  30 +--
 .../resteasy/test/ServletInitializerTest.java      |  20 +-
 .../camel/component/resteasy/test/WebTest.java     | 203 +++++++++++++++++++++
 .../camel-resteasy/src/test/resources/pom.xml      |   4 +-
 16 files changed, 428 insertions(+), 226 deletions(-)

diff --git a/components/camel-resteasy/pom.xml b/components/camel-resteasy/pom.xml
index 5c03de3..245e899 100644
--- a/components/camel-resteasy/pom.xml
+++ b/components/camel-resteasy/pom.xml
@@ -118,8 +118,8 @@
 
         <!-- test dependencies -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -135,7 +135,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -270,6 +270,11 @@
             <version>${jboss-el-api_3.0_spec-version}</version>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerMatchUriOnPrefix.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerMatchUriOnPrefix.java
index c39ecbf..c79c4ca 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerMatchUriOnPrefix.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerMatchUriOnPrefix.java
@@ -21,26 +21,22 @@ import java.net.URI;
 
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.SimpleService;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-@RunWith(Arquillian.class)
-@RunAsClient
+@WebTest
 public class ResteasyConsumerMatchUriOnPrefix {
-    @ArquillianResource
+
+    @Resource
     URI baseUri;
     
     @Deployment
@@ -69,6 +65,6 @@ public class ResteasyConsumerMatchUriOnPrefix {
                 .request().get();
         String entity = response.readEntity(String.class);
         assertEquals(200, response.getStatus());
-        Assert.assertEquals("Body set from camel route", entity);
+        assertEquals("Body set from camel route", entity);
     }
 }
\ No newline at end of file
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerProxyTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerProxyTest.java
index 552e1b6..6453078 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerProxyTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerProxyTest.java
@@ -26,27 +26,25 @@ import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.Customer;
 import org.apache.camel.component.resteasy.test.beans.ProxyBean;
 import org.apache.camel.component.resteasy.test.beans.ProxyServiceInterface;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
-@RunAsClient
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyConsumerProxyTest {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
     
     @Deployment
@@ -71,16 +69,16 @@ public class ResteasyConsumerProxyTest {
         WebTarget target = client.target(baseUri.toString() + "camel/address");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Proxy address only from Camel", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Proxy address only from Camel", response.readEntity(String.class));
     }
 
     @Test
     public void testProxyFromInterface() throws Exception {
         Response response = ResteasyClientBuilder.newClient().target(baseUri.toString() + "proxy/get").request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Address from ProxyInterface", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Address from ProxyInterface", response.readEntity(String.class));
 
     }
 
@@ -94,8 +92,8 @@ public class ResteasyConsumerProxyTest {
         WebTarget target = client.target(baseUri.toString() + "proxy/createCustomer");
         Response response = target.request(MediaType.APPLICATION_JSON).post(Entity.entity(customer, MediaType.APPLICATION_JSON_TYPE));
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Customer added : {\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":1}", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Customer added : {\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":1}", response.readEntity(String.class));
 
     }
 
@@ -105,7 +103,7 @@ public class ResteasyConsumerProxyTest {
         WebTarget target = client.target(baseUri.toString() + "proxy/createCustomer");
         Response response = target.request().get();
 
-        Assert.assertEquals(405, response.getStatus());
+        assertEquals(405, response.getStatus());
 
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTest.java
index b5f9067..84af74e 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTest.java
@@ -27,27 +27,26 @@ import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.Customer;
 import org.apache.camel.component.resteasy.test.beans.CustomerList;
 import org.apache.camel.component.resteasy.test.beans.CustomerService;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.junit.InSequence;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
-@RunAsClient
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+
+@WebTest
 public class ResteasyConsumerTest {
 
-    @ArquillianResource
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -70,7 +69,7 @@ public class ResteasyConsumerTest {
         Response response = target.request(MediaType.APPLICATION_JSON)
                 .post(Entity.entity(customer, MediaType.APPLICATION_JSON_TYPE));
 
-        Assert.assertEquals(200, response.getStatus());
+        assertEquals(200, response.getStatus());
         return response;
     }
 
@@ -79,7 +78,7 @@ public class ResteasyConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "customer/deleteCustomer?id=" + id);
         Response response = target.request().delete();
 
-        Assert.assertEquals(200, response.getStatus());
+        assertEquals(200, response.getStatus());
 
         return response;
     }
@@ -89,13 +88,13 @@ public class ResteasyConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "customer/getCustomer?id=" + id);
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
+        assertEquals(200, response.getStatus());
 
         return response.readEntity(Customer.class);
     }
 
     @Test
-    @InSequence(1)
+    @Order(1)
     public void testGetAll() throws Exception {
         String expectedUser1 = "{\"name\":\"Roman\",\"surname\":\"Jakubco\",\"id\":1}";
         String expectedUser2 = "{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}";
@@ -104,31 +103,31 @@ public class ResteasyConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "customer/getAll");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
+        assertEquals(200, response.getStatus());
 
         String users = response.readEntity(String.class);
-        Assert.assertTrue(users.contains(expectedUser1));
-        Assert.assertTrue(users.contains(expectedUser2));
+        assertTrue(users.contains(expectedUser1));
+        assertTrue(users.contains(expectedUser2));
 
         File file = new File("target/test/consumerTest/all.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
 
-        Assert.assertTrue(responseBody.contains(expectedUser1));
-        Assert.assertTrue(responseBody.contains(expectedUser2));
+        assertTrue(responseBody.contains(expectedUser1));
+        assertTrue(responseBody.contains(expectedUser2));
     }
 
     @Test
     public void testGet() throws Exception {
         Customer customer = getCustomer(2);
 
-        Assert.assertEquals(new Customer("Camel", "Rider", 2), customer);
+        assertEquals(new Customer("Camel", "Rider", 2), customer);
 
         File file = new File("target/test/consumerTest/get.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
 
-        Assert.assertEquals("{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}", responseBody);
+        assertEquals("{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}", responseBody);
     }
 
     @Test
@@ -139,15 +138,15 @@ public class ResteasyConsumerTest {
 
         Customer customer = new Customer("TestCreate", "TestCreate", customerId);
         Response response = createCustomer(customer);
-        // Assert.assertEquals(expectedResponse,
+        // assertEquals(expectedResponse,
         // response.readEntity(String.class));
 
         File file = new File("target/test/consumerTest/create.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
-        Assert.assertEquals(expectedResponse, responseBody);
+        assertEquals(expectedResponse, responseBody);
 
-        Assert.assertEquals(customer, getCustomer(customerId));
+        assertEquals(customer, getCustomer(customerId));
 
         deleteCustomer(customerId);
     }
@@ -162,20 +161,20 @@ public class ResteasyConsumerTest {
         createCustomer(customer);
         Response responseDelete = deleteCustomer(customerId);
 
-        Assert.assertEquals(200, responseDelete.getStatus());
-        Assert.assertEquals(expectedResponse, responseDelete.readEntity(String.class));
+        assertEquals(200, responseDelete.getStatus());
+        assertEquals(expectedResponse, responseDelete.readEntity(String.class));
 
         File file = new File("target/test/consumerTest/delete.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
-        Assert.assertEquals(expectedResponse, responseBody);
+        assertEquals(expectedResponse, responseBody);
 
         Client client = ClientBuilder.newBuilder().build();
         WebTarget target = client.target(baseUri.toString() + "customer/getCustomer?id=" + customerId);
         Response response = target.request().get();
 
-        Assert.assertEquals(404, response.getStatus());
-        Assert.assertEquals("Customer with given id doesn't exist", response.readEntity(String.class));
+        assertEquals(404, response.getStatus());
+        assertEquals("Customer with given id doesn't exist", response.readEntity(String.class));
     }
 
     @Test
@@ -195,16 +194,16 @@ public class ResteasyConsumerTest {
         Response response = target.request(MediaType.APPLICATION_JSON_TYPE)
                 .put(Entity.entity(customer, MediaType.APPLICATION_JSON_TYPE));
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals(expectedResponse, response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals(expectedResponse, response.readEntity(String.class));
 
         File file = new File("target/test/consumerTest/update.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
-        Assert.assertEquals(expectedResponse, responseBody);
+        assertEquals(expectedResponse, responseBody);
 
         Customer updatedCustomer = getCustomer(customerId);
-        Assert.assertEquals(customer, updatedCustomer);
+        assertEquals(customer, updatedCustomer);
 
         deleteCustomer(customerId);
     }
@@ -215,7 +214,7 @@ public class ResteasyConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "customer/createCustomer");
         Response response = target.request().get();
 
-        Assert.assertEquals(405, response.getStatus());
+        assertEquals(405, response.getStatus());
     }
 
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTwoServletsTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTwoServletsTest.java
index d18c5c0..d703bbb 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTwoServletsTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyConsumerTwoServletsTest.java
@@ -24,25 +24,23 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.ServletOneService;
 import org.apache.camel.component.resteasy.test.beans.ServletTwoService;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
-@RunAsClient
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyConsumerTwoServletsTest {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -64,14 +62,14 @@ public class ResteasyConsumerTwoServletsTest {
         WebTarget target = client.target(baseUri.toString() + "numberOne/simpleServiceSecure/getMsg");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Message from camel-servlet-1", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Message from camel-servlet-1", response.readEntity(String.class));
 
         Client client2 = ClientBuilder.newBuilder().build();
         WebTarget target2 = client2.target(baseUri.toString() + "numberTwo/simpleServiceSecure/getMsg");
         Response response2 = target2.request().get();
 
-        Assert.assertEquals(200, response2.getStatus());
-        Assert.assertEquals("Message from camel-servlet-2", response2.readEntity(String.class));
+        assertEquals(200, response2.getStatus());
+        assertEquals("Message from camel-servlet-2", response2.readEntity(String.class));
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyMethodRestrictTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyMethodRestrictTest.java
index c3b7575..0916126 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyMethodRestrictTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyMethodRestrictTest.java
@@ -24,21 +24,21 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyMethodRestrictTest {
 
-    @ArquillianResource
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -59,12 +59,12 @@ public class ResteasyMethodRestrictTest {
         WebTarget target = client.target(baseUri.toString() + "method/restrict");
         Response response = target.request().get();
 
-        Assert.assertEquals(405, response.getStatus());
+        assertEquals(405, response.getStatus());
 
         Client client2 = ClientBuilder.newBuilder().build();
         WebTarget target2 = client2.target(baseUri.toString()  + "method/restrict");
         Response response2 = target2.request().delete();
-        Assert.assertEquals(200, response2.getStatus());
-        Assert.assertEquals("Response from httpMethodRestrict", response2.readEntity(String.class));
+        assertEquals(200, response2.getStatus());
+        assertEquals("Response from httpMethodRestrict", response2.readEntity(String.class));
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerProxyTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerProxyTest.java
index 89d4093..0a53d86 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerProxyTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerProxyTest.java
@@ -29,28 +29,30 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jackson.JacksonDataFormat;
 import org.apache.camel.component.resteasy.ResteasyComponent;
 import org.apache.camel.component.resteasy.ResteasyConstants;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.Customer;
 import org.apache.camel.component.resteasy.test.beans.CustomerList;
 import org.apache.camel.component.resteasy.test.beans.CustomerService;
 import org.apache.camel.component.resteasy.test.beans.ProxyProducerInterface;
 import org.apache.camel.component.resteasy.test.beans.ResteasyProducerProxyTestApp;
 import org.apache.camel.spi.DataFormat;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.junit.InSequence;
-import org.jboss.arquillian.test.api.ArquillianResource;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Order;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+
+@WebTest
 public class ResteasyProducerProxyTest extends CamelTestSupport {   
-    @ArquillianResource
+
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -117,19 +119,19 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:delete", null, headers, String.class);
-        Assert.assertTrue(response.contains(String.valueOf(id)));
-        Assert.assertTrue(response.contains("Customer deleted :"));
+        assertTrue(response.contains(String.valueOf(id)));
+        assertTrue(response.contains("Customer deleted :"));
     }
 
     @Test
-    @InSequence(1)
+    @Order(1)
     public void testProxyGetAll() throws Exception {
         String expectedUser1 = "{\"name\":\"Roman\",\"surname\":\"Jakubco\",\"id\":1}";
         String expectedUser2 = "{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}";
 
         String response = template.requestBody("direct:getAll", null, String.class);
-        Assert.assertTrue(response.contains(expectedUser1));
-        Assert.assertTrue(response.contains(expectedUser2));
+        assertTrue(response.contains(expectedUser1));
+        assertTrue(response.contains(expectedUser2));
     }
 
     @Test
@@ -144,7 +146,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
                 exchange.getIn().getHeaders().put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
             }
         });
-        Assert.assertEquals(expectedBody, response.getMessage().getBody(String.class));
+        assertEquals(expectedBody, response.getMessage().getBody(String.class));
     }
 
 
@@ -161,7 +163,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
                 exchange.getIn().getHeaders().put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
             }
         });
-        Assert.assertEquals(expectedCustomer, response.getMessage().getBody(Customer.class));
+        assertEquals(expectedCustomer, response.getMessage().getBody(Customer.class));
 
     }
 
@@ -176,7 +178,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         deleteCustomer(customerId);
     }
@@ -192,7 +194,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
 
 
@@ -204,7 +206,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         response = template.requestBodyAndHeaders("direct:put", null, headers, String.class);
-        Assert.assertEquals("Customer updated : " + expectedCustomer, response);
+        assertEquals("Customer updated : " + expectedCustomer, response);
 
         deleteCustomer(customerId);
     }
@@ -220,7 +222,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         params.clear();
         headers.clear();
@@ -228,7 +230,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         response = template.requestBodyAndHeaders("direct:delete", null, headers, String.class);
-        Assert.assertEquals("Customer deleted : " + expectedCustomer, response);
+        assertEquals("Customer deleted : " + expectedCustomer, response);
 
     }
 
@@ -243,7 +245,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
 
         String expectedCustomers = "[{\"name\":\"Test\",\"surname\":\"Test\",\"id\":6},{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2},{\"name\":\"Roman\",\"surname\":\"Jakubco\",\"id\":1}]";
@@ -254,7 +256,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         params.add(1);
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
         response = template.requestBodyAndHeaders("direct:moreAttributes", null, headers, String.class);
-        Assert.assertEquals(expectedCustomers, response);
+        assertEquals(expectedCustomers, response);
 
         deleteCustomer(customerId);
     }
@@ -271,7 +273,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
 
         headers.clear();
@@ -280,7 +282,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         params.add(expectedCustomer);
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
         response = template.requestBodyAndHeaders("direct:differentType", null, headers, String.class);
-        Assert.assertEquals("Customers are equal", response);
+        assertEquals("Customers are equal", response);
 
         headers.clear();
         params.clear();
@@ -288,7 +290,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         params.add(expectedCustomer);
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
         response = template.requestBodyAndHeaders("direct:differentType", null, headers, String.class);
-        Assert.assertEquals("Customers are not equal", response);
+        assertEquals("Customers are not equal", response);
 
         Customer testCustomer = new Customer("Camel", "Rider", 2);
         headers.clear();
@@ -297,7 +299,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         params.add(testCustomer);
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
         response = template.requestBodyAndHeaders("direct:differentType", null, headers, String.class);
-        Assert.assertEquals("Customers are equal", response);
+        assertEquals("Customers are equal", response);
 
         deleteCustomer(customerId);
 
@@ -315,7 +317,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
 
 
@@ -330,8 +332,8 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
             }
         });
 
-        Assert.assertTrue(exchange.getMessage().getBody() instanceof NoSuchMethodException);
-        Assert.assertTrue(exchange.getMessage().getHeaders().containsKey(ResteasyConstants.RESTEASY_PROXY_PRODUCER_EXCEPTION));
+        assertTrue(exchange.getMessage().getBody() instanceof NoSuchMethodException);
+        assertTrue(exchange.getMessage().getHeaders().containsKey(ResteasyConstants.RESTEASY_PROXY_PRODUCER_EXCEPTION));
 
         deleteCustomer(customerId);
     }
@@ -347,7 +349,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
 
         String response = template.requestBodyAndHeaders("direct:post", null, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
 
         headers.clear();
@@ -356,7 +358,7 @@ public class ResteasyProducerProxyTest extends CamelTestSupport {
         headers.put(ResteasyConstants.RESTEASY_PROXY_METHOD_PARAMS, params);
         response = template.requestBodyAndHeaders("direct:notResponseType", null, headers, String.class);
 
-        Assert.assertEquals(expectedCustomer.toString(), response);
+        assertEquals(expectedCustomer.toString(), response);
 
         deleteCustomer(customerId);
 
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerTest.java
index 41b8e30..8b9b23e 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyProducerTest.java
@@ -32,27 +32,30 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jackson.JacksonDataFormat;
 import org.apache.camel.component.resteasy.ResteasyComponent;
 import org.apache.camel.component.resteasy.ResteasyConstants;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.Customer;
 import org.apache.camel.component.resteasy.test.beans.CustomerList;
 import org.apache.camel.component.resteasy.test.beans.CustomerService;
 import org.apache.camel.component.resteasy.test.beans.TestBean;
 import org.apache.camel.spi.DataFormat;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotEquals;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+
+@WebTest
 public class ResteasyProducerTest  extends CamelTestSupport {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -111,8 +114,8 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         String expectedUser1 = "{\"name\":\"Roman\",\"surname\":\"Jakubco\",\"id\":1}";
         String expectedUser2 = "{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}";
         String response = template.requestBody("direct:getAll", null, String.class);
-        Assert.assertTrue(response.contains(expectedUser1));
-        Assert.assertTrue(response.contains(expectedUser2));
+        assertTrue(response.contains(expectedUser1));
+        assertTrue(response.contains(expectedUser2));
     }
 
     @Test
@@ -120,7 +123,7 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         String expectedBody = "{\"name\":\"Camel\",\"surname\":\"Rider\",\"id\":2}";
 
         String response = template.requestBodyAndHeader("direct:get", null, Exchange.HTTP_QUERY, "id=2", String.class);
-        Assert.assertEquals(expectedBody, response);
+        assertEquals(expectedBody, response);
     }
 
 
@@ -129,7 +132,7 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         Integer customerId = 2;
         Customer expectedCustomer = new Customer("Camel", "Rider", customerId);
         Customer customer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(expectedCustomer, customer);
+        assertEquals(expectedCustomer, customer);
     }
 
     @Test
@@ -137,10 +140,10 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         Integer customerId = 3;
         Customer expectedCustomer = new Customer("TestPost", "TestPost", customerId);
         String response = template.requestBodyAndHeader("direct:post", "{\"name\":\"TestPost\",\"surname\":\"TestPost\",\"id\":3}", Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         Customer customer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(expectedCustomer, customer);
+        assertEquals(expectedCustomer, customer);
 
         template.sendBodyAndHeader("direct:delete", null, Exchange.HTTP_QUERY, "id=" + customerId);
     }
@@ -151,10 +154,10 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         Customer expectedCustomer = new Customer("TestPostMarshal", "TestPostMarshal", customerId);
 
         String response = template.requestBodyAndHeader("direct:postMarshal", expectedCustomer, Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         Customer customer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(expectedCustomer, customer);
+        assertEquals(expectedCustomer, customer);
 
         template.sendBodyAndHeader("direct:delete", null, Exchange.HTTP_QUERY, "id=" + customerId);
     }
@@ -165,21 +168,21 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         Customer customer = new Customer("TestPut", "TestPut", customerId);
 
         String response = template.requestBodyAndHeader("direct:postMarshal", customer, Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON, String.class);
-        Assert.assertEquals("Customer added : " + customer, response);
+        assertEquals("Customer added : " + customer, response);
 
         Customer oldCustomer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(customer, oldCustomer);
+        assertEquals(customer, oldCustomer);
 
         oldCustomer.setName("Updated");
         oldCustomer.setSurname("updated");
 
         response = template.requestBodyAndHeader("direct:put", oldCustomer, Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON, String.class);
-        Assert.assertEquals("Customer updated : " + oldCustomer, response);
+        assertEquals("Customer updated : " + oldCustomer, response);
 
 
         Customer updatedCustomer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(oldCustomer, updatedCustomer);
-        Assert.assertNotEquals(customer, updatedCustomer);
+        assertEquals(oldCustomer, updatedCustomer);
+        assertNotEquals(customer, updatedCustomer);
 
         template.sendBodyAndHeader("direct:delete", null, Exchange.HTTP_QUERY, "id=" + customerId);
     }
@@ -190,15 +193,15 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         Customer expectedCustomer = new Customer("TestDelete", "TestDelete", customerId);
 
         String response = template.requestBodyAndHeader("direct:postMarshal", expectedCustomer, Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         Customer customer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(expectedCustomer, customer);
+        assertEquals(expectedCustomer, customer);
 
         template.sendBodyAndHeader("direct:delete", null, Exchange.HTTP_QUERY, "id=" + customerId);
 
         response = template.requestBodyAndHeader("direct:get", null, Exchange.HTTP_QUERY, "id=" + customerId, String.class);
-        Assert.assertEquals("Customer with given id doesn't exist", response);
+        assertEquals("Customer with given id doesn't exist", response);
     }
 
 
@@ -216,7 +219,7 @@ public class ResteasyProducerTest  extends CamelTestSupport {
             }
         });
 
-        Assert.assertEquals(405, exchange.getMessage().getHeaders().get("CamelHttpResponseCode"));
+        assertEquals(405, exchange.getMessage().getHeaders().get("CamelHttpResponseCode"));
 
         Map<String, Object> headers = new HashMap<>();
 
@@ -224,18 +227,19 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         headers.put(Exchange.CONTENT_TYPE, MediaType.APPLICATION_JSON);
 
         String response = template.requestBodyAndHeaders("direct:postInHeader", expectedCustomer, headers, String.class);
-        Assert.assertEquals("Customer added : " + expectedCustomer, response);
+        assertEquals("Customer added : " + expectedCustomer, response);
 
         Customer customer = template.requestBodyAndHeader("direct:getUnmarshal", null, Exchange.HTTP_QUERY, "id=" + customerId, Customer.class);
-        Assert.assertEquals(expectedCustomer, customer);
+        assertEquals(expectedCustomer, customer);
 
         template.sendBodyAndHeader("direct:delete", null, Exchange.HTTP_QUERY, "id=" + customerId);
     }
 
 
-    @Test(expected = CamelExecutionException.class)
+    @Test
     public void testSettingNotExistingHttpMethod() throws Exception {
-        template.requestBodyAndHeader("direct:getAll", null, ResteasyConstants.RESTEASY_HTTP_METHOD, "GAT");
+        assertThrows(CamelExecutionException.class,
+            () -> template.requestBodyAndHeader("direct:getAll", null, ResteasyConstants.RESTEASY_HTTP_METHOD, "GAT"));
     }
 
 
@@ -255,10 +259,10 @@ public class ResteasyProducerTest  extends CamelTestSupport {
         ArrayList contentLength = (ArrayList) headers.get("Content-Length");
         Integer responseCode = (Integer) headers.get("CamelHttpResponseCode");
 
-        Assert.assertEquals("application/json", contentType.get(0));
-        //Assert.assertEquals("WildFly/8", server.get(0));
-        Assert.assertEquals("87", contentLength.get(0));
-        Assert.assertEquals(new Integer(200), responseCode);
+        assertEquals("application/json", contentType.get(0));
+        //assertEquals("WildFly/8", server.get(0));
+        assertEquals("87", contentLength.get(0));
+        assertEquals(new Integer(200), responseCode);
     }
 
 
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyCamelTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyCamelTest.java
index cb3e4f9..ac76ac4 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyCamelTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyCamelTest.java
@@ -24,21 +24,21 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyRestDSLProxyCamelTest {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
     
     @Deployment
@@ -61,8 +61,8 @@ public class ResteasyRestDSLProxyCamelTest {
         WebTarget target = client.target(baseUri.toString() + "say/hello");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Only message from Camel", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Only message from Camel", response.readEntity(String.class));
 
     }
 
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyTest.java
index 3c651ff..3b2ffb8 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLProxyTest.java
@@ -24,22 +24,23 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.Customer;
 import org.apache.camel.component.resteasy.test.beans.ProxyServiceInterface;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyRestDSLProxyTest {
-    @ArquillianResource
+
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -63,8 +64,8 @@ public class ResteasyRestDSLProxyTest {
         WebTarget target = client.target(baseUri.toString() + "proxy/get");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Address from ProxyInterface", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Address from ProxyInterface", response.readEntity(String.class));
 
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLTest.java
index cf970a3..4139ba7 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasyRestDSLTest.java
@@ -24,22 +24,22 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.SimpleService;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasyRestDSLTest {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
     
     @Deployment
@@ -63,8 +63,8 @@ public class ResteasyRestDSLTest {
         WebTarget target = client.target(baseUri.toString() + "simpleService/getMsg");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Text from camel. Response from REST : Message1 from Rest service", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Text from camel. Response from REST : Message1 from Rest service", response.readEntity(String.class));
 
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySetHttpBindingTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySetHttpBindingTest.java
index 981ad64..51cdf683 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySetHttpBindingTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySetHttpBindingTest.java
@@ -22,22 +22,22 @@ import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.resteasy.ResteasyComponent;
 import org.apache.camel.component.resteasy.ResteasyHttpBinding;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
 import org.apache.camel.component.resteasy.test.beans.TestHttpBinding;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.support.DefaultRegistry;
 import org.apache.camel.support.SimpleRegistry;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasySetHttpBindingTest extends CamelTestSupport {
 
     @Deployment
@@ -78,7 +78,7 @@ public class ResteasySetHttpBindingTest extends CamelTestSupport {
     @Test
     public void testSettingResteasyHttpBinding() throws Exception {
         String response = template.requestBody("direct:start", null, String.class);
-        Assert.assertEquals("Test from custom HttpBinding", response);
+        assertEquals("Test from custom HttpBinding", response);
 
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySimpleConsumerTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySimpleConsumerTest.java
index 9b2934f..6e22108 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySimpleConsumerTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ResteasySimpleConsumerTest.java
@@ -25,23 +25,23 @@ import javax.ws.rs.client.ClientBuilder;
 import javax.ws.rs.client.WebTarget;
 import javax.ws.rs.core.Response;
 
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.apache.camel.component.resteasy.test.beans.SimpleService;
 import org.apache.camel.component.resteasy.test.beans.TestBean;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
 
-@RunWith(Arquillian.class)
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+
+@WebTest
 public class ResteasySimpleConsumerTest {
     
-    @ArquillianResource
+    @Resource
     URI baseUri;
     
     @Deployment
@@ -63,8 +63,8 @@ public class ResteasySimpleConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "simpleService/getMsg");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Added this message from bean to original message from Rest Service -> Message1 from Rest service", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Added this message from bean to original message from Rest Service -> Message1 from Rest service", response.readEntity(String.class));
     }
 
     @Test
@@ -73,8 +73,8 @@ public class ResteasySimpleConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "simpleService/getMsg2");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals("Overriding output from Rest service", response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals("Overriding output from Rest service", response.readEntity(String.class));
     }
 
     @Test
@@ -85,14 +85,14 @@ public class ResteasySimpleConsumerTest {
         WebTarget target = client.target(baseUri.toString() + "simpleService/getMsg3");
         Response response = target.request().get();
 
-        Assert.assertEquals(200, response.getStatus());
-        Assert.assertEquals(expectedResponse, response.readEntity(String.class));
+        assertEquals(200, response.getStatus());
+        assertEquals(expectedResponse, response.readEntity(String.class));
 
         File file = new File("target/messageTest/response.txt");
         byte[] encoded = Files.readAllBytes(file.toPath());
         String responseBody = new String(encoded);
 
-        Assert.assertEquals(expectedResponse, responseBody);
+        assertEquals(expectedResponse, responseBody);
     }
 
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ServletInitializerTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ServletInitializerTest.java
index 500f135..937e998 100644
--- a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ServletInitializerTest.java
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/ServletInitializerTest.java
@@ -21,20 +21,17 @@ import java.net.URI;
 
 import javax.ws.rs.core.Response;
 
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
+import org.apache.camel.component.resteasy.test.WebTest.Deployment;
+import org.apache.camel.component.resteasy.test.WebTest.Resource;
 import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
 import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.ShrinkWrap;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
 import org.jboss.shrinkwrap.resolver.api.maven.Maven;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
-import static org.junit.Assert.assertEquals;
 
 /**
    See the Servlet 3.0 spec, section 8.2.4 for implementation and processing the details
@@ -50,11 +47,10 @@ import static org.junit.Assert.assertEquals;
    resource and provider classes as well as no web.xml file.
  */
 
-@RunWith(Arquillian.class)
-@RunAsClient
+@WebTest
 public class ServletInitializerTest {
 
-    @ArquillianResource
+    @Resource
     URI baseUri;
 
     @Deployment
@@ -80,6 +76,6 @@ public class ServletInitializerTest {
            .target(baseUri.toString() + "test/17").request().get();
         String entity = response.readEntity(String.class);
         assertEquals(200, response.getStatus());
-        Assert.assertEquals("17", entity);
+        assertEquals("17", entity);
     }
 }
diff --git a/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/WebTest.java b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/WebTest.java
new file mode 100644
index 0000000..325325c
--- /dev/null
+++ b/components/camel-resteasy/src/test/java/org/apache/camel/component/resteasy/test/WebTest.java
@@ -0,0 +1,203 @@
+/*
+ * 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.resteasy.test;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.servlet.ServletContext;
+
+import org.eclipse.jetty.deploy.App;
+import org.jboss.arquillian.container.jetty.embedded_9.JettyEmbeddedConfiguration;
+import org.jboss.arquillian.container.jetty.embedded_9.JettyEmbeddedContainer;
+import org.jboss.arquillian.container.spi.client.protocol.metadata.ProtocolMetaData;
+import org.jboss.arquillian.container.test.impl.enricher.resource.URIResourceProvider;
+import org.jboss.arquillian.container.test.impl.enricher.resource.URLResourceProvider;
+import org.jboss.arquillian.core.api.InstanceProducer;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.arquillian.test.spi.enricher.resource.ResourceProvider;
+import org.jboss.shrinkwrap.api.Archive;
+import org.junit.jupiter.api.extension.AfterAllCallback;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.BeforeAllCallback;
+import org.junit.jupiter.api.extension.BeforeEachCallback;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.extension.ExtensionContext;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+@Retention(RUNTIME)
+@Target(ElementType.TYPE)
+@ExtendWith(WebTest.WebTestExtension.class)
+public @interface WebTest {
+
+    @Retention(RUNTIME)
+    @Target({ElementType.FIELD, ElementType.PARAMETER})
+    @interface Resource {
+    }
+
+    @Retention(RUNTIME)
+    @Target(ElementType.METHOD)
+    @interface Deployment {
+    }
+
+    class WebTestExtension implements BeforeAllCallback, BeforeEachCallback, AfterEachCallback, AfterAllCallback {
+
+        @ArquillianResource
+        private static final Object DUMMY = null;
+        private static final ArquillianResource ARQUILLIAN_RESOURCE;
+
+        static {
+            try {
+                ARQUILLIAN_RESOURCE = WebTestExtension.class.getDeclaredField("DUMMY").getAnnotation(ArquillianResource.class);
+            } catch (NoSuchFieldException e) {
+                throw new IllegalStateException(e);
+            }
+        }
+
+        private List<ResourceProvider> providers;
+
+        @Override
+        public void beforeAll(ExtensionContext context) throws Exception {
+            Class<?> testClass = context.getRequiredTestClass();
+            List<Method> methods = Stream.of(testClass.getMethods())
+                    .filter(m -> m.getAnnotation(Deployment.class) != null)
+                    .collect(Collectors.toList());
+            if (methods.size() != 1) {
+                throw new IllegalStateException("Expecting a single method annotated with @Deployment");
+            }
+            Method method = methods.iterator().next();
+            method.setAccessible(true);
+            Object value = method.invoke(null);
+            if (!(value instanceof Archive)) {
+                throw new IllegalStateException("Method " + method.getName() + " returned an object which is not an Archive");
+            }
+            ExtensionContext.Store store = getStore(context);
+
+            JettyEmbeddedConfiguration config = new JettyEmbeddedConfiguration();
+            config.setBindHttpPort(0);
+            JettyEmbeddedContainer container = new JettyEmbeddedContainer();
+            inject(container, "webAppContextProducer", new Instance<>(store, App.class));
+            inject(container, "servletContextInstanceProducer", new Instance<>(store, ServletContext.class));
+
+            container.setup(config);
+            container.start();
+            ProtocolMetaData metaData = container.deploy((Archive) value);
+            new Instance<>(store, ProtocolMetaData.class).set(metaData);
+            new Instance<>(store, JettyEmbeddedContainer.class).set(container);
+
+            URLResourceProvider url = new URLResourceProvider();
+            inject(url, "protocolMetadata", new Instance<>(getStore(context), ProtocolMetaData.class));
+            URIResourceProvider uri = new URIResourceProvider();
+            inject(uri, "protocolMetadata", new Instance<>(getStore(context), ProtocolMetaData.class));
+            providers = Arrays.asList(url, uri);
+        }
+
+        private void inject(Object instance, String fieldName, Object value) {
+            try {
+                Field f = null;
+                Class<?> clazz = instance.getClass();
+                while (f == null && clazz != null) {
+                    try {
+                        f = clazz.getDeclaredField(fieldName);
+                    } catch (NoSuchFieldException e) {
+                        clazz = clazz.getSuperclass();
+                    }
+                }
+                if (f == null) {
+                    throw new NoSuchFieldException(fieldName);
+                }
+                inject(instance, f, value);
+            } catch (Exception e) {
+                throw new RuntimeException("Unable to inject field", e);
+            }
+        }
+
+        private void inject(Object instance, Field f, Object value) {
+            try {
+                f.setAccessible(true);
+                f.set(instance, value);
+            } catch (Exception e) {
+                throw new RuntimeException("Unable to inject field", e);
+            }
+        }
+
+        @Override
+        public void beforeEach(ExtensionContext context) throws Exception {
+            Class<?> testClass = context.getRequiredTestClass();
+            List<Field> fields = Stream.of(testClass.getDeclaredFields())
+                    .filter(f -> f.isAnnotationPresent(Resource.class))
+                    .collect(Collectors.toList());
+            if (!fields.isEmpty()) {
+                for (Field field : fields) {
+                    List<ResourceProvider> matching = providers.stream()
+                            .filter(p -> p.canProvide(field.getType()))
+                            .collect(Collectors.toList());
+                    if (matching.size() == 0) {
+                        throw new IllegalStateException("No matching resource provider for " + field.getType());
+                    } else if (matching.size() > 1) {
+                        throw new IllegalStateException("Ambiguous resource provider for " + field.getType());
+                    } else {
+                        ResourceProvider rp = matching.iterator().next();
+                        Object value = rp.lookup(ARQUILLIAN_RESOURCE);
+                        inject(context.getRequiredTestInstance(), field, value);
+                    }
+                }
+            }
+        }
+
+        @Override
+        public void afterEach(ExtensionContext context) throws Exception {
+        }
+
+        @Override
+        public void afterAll(ExtensionContext context) throws Exception {
+            JettyEmbeddedContainer container = getStore(context).get(JettyEmbeddedContainer.class, JettyEmbeddedContainer.class);
+            container.stop();
+        }
+
+        private ExtensionContext.Store getStore(ExtensionContext context) {
+            return context.getStore(ExtensionContext.Namespace.create(WebTestExtension.class));
+        }
+
+        private static class Instance<T> implements InstanceProducer<T> {
+            final ExtensionContext.Store store;
+            final Class<T> type;
+
+            public Instance(ExtensionContext.Store store, Class<T> type) {
+                this.store = store;
+                this.type = type;
+            }
+
+            public T get() {
+                return store.get(type, type);
+            }
+            public void set(T value) {
+                store.put(type, value);
+            }
+        }
+
+    }
+}
+
diff --git a/components/camel-resteasy/src/test/resources/pom.xml b/components/camel-resteasy/src/test/resources/pom.xml
index ca243e3..b91885e 100644
--- a/components/camel-resteasy/src/test/resources/pom.xml
+++ b/components/camel-resteasy/src/test/resources/pom.xml
@@ -35,8 +35,8 @@
 
 	<dependencies>
 		<dependency>
-			<groupId>junit</groupId>
-			<artifactId>junit</artifactId>
+			<groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
 			<version>4.8.2</version>
 			<scope>test</scope>
 		</dependency>


[camel] 10/18: [CAMEL-11807] Upgrade camel-openapi-java to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit b62f2d1e1ad249d970a375a2c941270039a7893b
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:16:44 2020 +0200

    [CAMEL-11807] Upgrade camel-openapi-java to junit5
---
 components/camel-openapi-java/pom.xml                       |  4 ++--
 .../camel/openapi/OpenApiRestProducerFactoryTest.java       |  2 +-
 .../org/apache/camel/openapi/RestOpenApiProcessorTest.java  |  2 +-
 .../camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java | 12 ++++++++++--
 .../apache/camel/openapi/RestOpenApiReaderApiDocsTest.java  | 12 ++++++++++--
 .../camel/openapi/RestOpenApiReaderDayOfWeekTest.java       | 11 +++++++++--
 .../openapi/RestOpenApiReaderEnableVendorExtensionTest.java | 12 ++++++++++--
 .../openapi/RestOpenApiReaderModelApiSecurityTest.java      | 12 ++++++++++--
 .../camel/openapi/RestOpenApiReaderModelBookOrderTest.java  | 11 +++++++++--
 .../apache/camel/openapi/RestOpenApiReaderModelTest.java    | 12 ++++++++++--
 .../openapi/RestOpenApiReaderOverrideHostApiDocsTest.java   | 10 +++++++++-
 .../openapi/RestOpenApiReaderPropertyPlaceholderTest.java   | 13 ++++++++++---
 .../org/apache/camel/openapi/RestOpenApiReaderTest.java     | 11 +++++++++--
 .../SpringRestOpenApiReaderModelApiSecurityTest.java        | 12 ++++++++++--
 .../apache/camel/openapi/producer/RestOpenApiGetTest.java   |  4 ++--
 .../camel/openapi/producer/RestOpenApiGetUriParamTest.java  |  4 ++--
 16 files changed, 114 insertions(+), 30 deletions(-)

diff --git a/components/camel-openapi-java/pom.xml b/components/camel-openapi-java/pom.xml
index eb0ffa5..afc5b11 100644
--- a/components/camel-openapi-java/pom.xml
+++ b/components/camel-openapi-java/pom.xml
@@ -93,7 +93,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -118,7 +118,7 @@
         </dependency>
         <dependency>
             <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
+            <artifactId>mockito-junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
index 4a57e90..82d13d4 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/OpenApiRestProducerFactoryTest.java
@@ -17,7 +17,7 @@
 package org.apache.camel.openapi;
 
 import org.apache.camel.impl.DefaultCamelContext;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class OpenApiRestProducerFactoryTest {
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java
index b697ef6..fc55927 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiProcessorTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
-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;
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
index 1f5f397..d9d53b8 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsOverrideTest.java
@@ -25,11 +25,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderApiDocsOverrideTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
index d0d6a1b..fdd260e 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderApiDocsTest.java
@@ -25,11 +25,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderApiDocsTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
index ff94ff0..d21f019 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderDayOfWeekTest.java
@@ -25,11 +25,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderDayOfWeekTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
index cef7f8f..a56f79f 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderEnableVendorExtensionTest.java
@@ -25,11 +25,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderEnableVendorExtensionTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
index 2293c6d..d0106e2 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelApiSecurityTest.java
@@ -25,11 +25,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderModelApiSecurityTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
index 2cd8016..3a4d26e 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelBookOrderTest.java
@@ -25,11 +25,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderModelBookOrderTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
index 0f11f8c..2283850 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderModelTest.java
@@ -25,11 +25,19 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderModelTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderOverrideHostApiDocsTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderOverrideHostApiDocsTest.java
index 528954e..7db0fa2 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderOverrideHostApiDocsTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderOverrideHostApiDocsTest.java
@@ -22,10 +22,18 @@ import com.fasterxml.jackson.databind.SerializationFeature;
 import io.apicurio.datamodels.Library;
 import io.apicurio.datamodels.openapi.models.OasDocument;
 import org.apache.camel.impl.engine.DefaultClassResolver;
-import org.junit.Test;
+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.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderOverrideHostApiDocsTest extends RestOpenApiReaderApiDocsTest {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @Override
     @Test
     public void testReaderRead() throws Exception {
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
index 84c22fb..826ac1f 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderPropertyPlaceholderTest.java
@@ -30,12 +30,19 @@ import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestDefinition;
 import org.apache.camel.model.rest.RestParamType;
 import org.apache.camel.openapi.producer.DummyRestProducerFactory;
-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.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderPropertyPlaceholderTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestProducerFactory factory = new DummyRestProducerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
index e382ac2..8c3cbb7 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/RestOpenApiReaderTest.java
@@ -27,11 +27,18 @@ import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.impl.engine.DefaultClassResolver;
 import org.apache.camel.model.rest.RestParamType;
-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 org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class RestOpenApiReaderTest extends CamelTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @BindToRegistry("dummy-rest")
     private DummyRestConsumerFactory factory = new DummyRestConsumerFactory();
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
index 24dc558..66b4f01 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.java
@@ -22,13 +22,21 @@ import com.fasterxml.jackson.databind.SerializationFeature;
 import io.apicurio.datamodels.Library;
 import io.apicurio.datamodels.openapi.models.OasDocument;
 import org.apache.camel.impl.engine.DefaultClassResolver;
-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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class SpringRestOpenApiReaderModelApiSecurityTest extends CamelSpringTestSupport {
 
+    private Logger log = LoggerFactory.getLogger(getClass());
+
     @Override
     protected AbstractApplicationContext createApplicationContext() {
         return new ClassPathXmlApplicationContext("org/apache/camel/openapi/SpringRestOpenApiReaderModelApiSecurityTest.xml");
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetTest.java
index a1ebe50..6bcd4de 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.openapi.producer;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class RestOpenApiGetTest extends CamelTestSupport {
 
diff --git a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetUriParamTest.java b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetUriParamTest.java
index 3d5fbc1..47c6e3f 100644
--- a/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetUriParamTest.java
+++ b/components/camel-openapi-java/src/test/java/org/apache/camel/openapi/producer/RestOpenApiGetUriParamTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.openapi.producer;
 import org.apache.camel.BindToRegistry;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class RestOpenApiGetUriParamTest extends CamelTestSupport {
 


[camel] 06/18: [CAMEL-11807] Upgrade camel-reactor to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 967c507602cb9b7723cc293440e5a81d5ff7a3b8
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 13:58:13 2020 +0200

    [CAMEL-11807] Upgrade camel-reactor to junit5
---
 components/camel-reactor/pom.xml                   |  6 +--
 .../ReactorStreamsServiceBackpressureTest.java     | 32 +++++++------
 .../engine/ReactorStreamsServiceEventTypeTest.java |  9 ++--
 .../ReactorStreamsServiceSubscriberTest.java       | 11 +++--
 .../reactor/engine/ReactorStreamsServiceTest.java  | 55 ++++++++++++----------
 .../engine/ReactorStreamsServiceTestSupport.java   |  2 +-
 6 files changed, 62 insertions(+), 53 deletions(-)

diff --git a/components/camel-reactor/pom.xml b/components/camel-reactor/pom.xml
index 4e5650d..1bc4496 100644
--- a/components/camel-reactor/pom.xml
+++ b/components/camel-reactor/pom.xml
@@ -62,7 +62,7 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -71,8 +71,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceBackpressureTest.java b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceBackpressureTest.java
index ad0e128..9b689f9 100644
--- a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceBackpressureTest.java
+++ b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceBackpressureTest.java
@@ -25,10 +25,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.reactive.streams.ReactiveStreamsBackpressureStrategy;
 import org.apache.camel.component.reactor.engine.suport.TestSubscriber;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import reactor.core.publisher.Flux;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class ReactorStreamsServiceBackpressureTest extends ReactorStreamsServiceTestSupport {
 
     @Test
@@ -57,12 +59,12 @@ public class ReactorStreamsServiceBackpressureTest extends ReactorStreamsService
 
         context.start();
 
-        Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
-        Assert.assertEquals(20, queue.size());
+        assertTrue(latch.await(5, TimeUnit.SECONDS));
+        assertEquals(20, queue.size());
 
         int num = 1;
         for (int i : queue) {
-            Assert.assertEquals(num++, i);
+            assertEquals(num++, i);
         }
     }
 
@@ -99,17 +101,17 @@ public class ReactorStreamsServiceBackpressureTest extends ReactorStreamsService
         crs.fromStream("integers", Integer.class).subscribe(subscriber);
         context.start();
 
-        Assert.assertTrue(latch.await(5, TimeUnit.SECONDS));
+        assertTrue(latch.await(5, TimeUnit.SECONDS));
         Thread.sleep(1000); // wait for all numbers to be generated
 
         subscriber.request(19);
-        Assert.assertTrue(latch2.await(1, TimeUnit.SECONDS));
+        assertTrue(latch2.await(1, TimeUnit.SECONDS));
 
         Thread.sleep(200); // add other time to ensure no other items arrive
-        Assert.assertEquals(2, queue.size());
+        assertEquals(2, queue.size());
 
         int sum = queue.stream().reduce(Integer::sum).get();
-        Assert.assertEquals(3, sum); // 1 + 2 = 3
+        assertEquals(3, sum); // 1 + 2 = 3
 
         subscriber.cancel();
     }
@@ -146,21 +148,21 @@ public class ReactorStreamsServiceBackpressureTest extends ReactorStreamsService
         crs.fromStream("integers", Integer.class).subscribe(subscriber);
         context.start();
 
-        Assert.assertTrue(latch1.await(5, TimeUnit.SECONDS));
+        assertTrue(latch1.await(5, TimeUnit.SECONDS));
         Thread.sleep(1000); // wait for all numbers to be generated
 
         subscriber.request(19);
-        Assert.assertTrue(latch2.await(1, TimeUnit.SECONDS));
+        assertTrue(latch2.await(1, TimeUnit.SECONDS));
 
         Thread.sleep(200); // add other time to ensure no other items arrive
 
         // TODO: the chain caches two elements instead of one: change it if you find an EmitterProcessor without prefetch
-        // Assert.assertEquals(2, queue.size());
-        Assert.assertEquals(3, queue.size());
+        // assertEquals(2, queue.size());
+        assertEquals(3, queue.size());
 
         int sum = queue.stream().reduce(Integer::sum).get();
-        // Assert.assertEquals(21, sum); // 1 + 20 = 21
-        Assert.assertEquals(23, sum); // 1 + 2 + 20 = 23
+        // assertEquals(21, sum); // 1 + 20 = 21
+        assertEquals(23, sum); // 1 + 2 + 20 = 23
 
         subscriber.cancel();
     }
diff --git a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceEventTypeTest.java b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceEventTypeTest.java
index 9a7d5f3..0892526 100644
--- a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceEventTypeTest.java
+++ b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceEventTypeTest.java
@@ -20,11 +20,12 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.reactive.streams.ReactiveStreamsConstants;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.reactivestreams.Subscriber;
 import reactor.core.publisher.Flux;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class ReactorStreamsServiceEventTypeTest extends ReactorStreamsServiceTestSupport {
 
     @Test
@@ -93,7 +94,7 @@ public class ReactorStreamsServiceEventTypeTest extends ReactorStreamsServiceTes
         endpoint.assertIsSatisfied();
 
         Exchange ex = endpoint.getExchanges().get(0);
-        Assert.assertEquals(1, ex.getIn().getBody());
+        assertEquals(1, ex.getIn().getBody());
     }
 
     @Test
@@ -128,7 +129,7 @@ public class ReactorStreamsServiceEventTypeTest extends ReactorStreamsServiceTes
         endpoint.assertIsSatisfied();
 
         Exchange exch = endpoint.getExchanges().get(0);
-        Assert.assertEquals(ex, exch.getIn().getBody());
+        assertEquals(ex, exch.getIn().getBody());
     }
 
     @Test
diff --git a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceSubscriberTest.java b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceSubscriberTest.java
index eb237ac..e102c4b 100644
--- a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceSubscriberTest.java
+++ b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceSubscriberTest.java
@@ -21,12 +21,13 @@ import java.util.concurrent.atomic.AtomicLong;
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.reactivestreams.Publisher;
 import org.reactivestreams.Subscriber;
 import reactor.core.publisher.Flux;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
 public class ReactorStreamsServiceSubscriberTest extends ReactorStreamsServiceTestSupport {
     @Test
     public void testSubscriber() throws Exception {
@@ -100,7 +101,7 @@ public class ReactorStreamsServiceSubscriberTest extends ReactorStreamsServiceTe
         endpoint.expectedMessageCount(1000);
         endpoint.assertIsSatisfied();
 
-        Assert.assertEquals(
+        assertEquals(
             1,
             endpoint.getExchanges().stream()
                 .map(x -> x.getIn().getHeader("thread", String.class))
@@ -113,7 +114,7 @@ public class ReactorStreamsServiceSubscriberTest extends ReactorStreamsServiceTe
 
         endpoint.getExchanges().stream()
             .map(x -> x.getIn().getBody(Long.class))
-            .forEach(n -> Assert.assertEquals(num.getAndIncrement(), n.longValue()));
+            .forEach(n -> assertEquals(num.getAndIncrement(), n.longValue()));
     }
 
     @Test
@@ -138,7 +139,7 @@ public class ReactorStreamsServiceSubscriberTest extends ReactorStreamsServiceTe
         endpoint.expectedMessageCount(1000);
         endpoint.assertIsSatisfied();
 
-        Assert.assertEquals(
+        assertEquals(
             3,
             endpoint.getExchanges().stream()
                 .map(x -> x.getIn().getHeader("thread", String.class))
diff --git a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTest.java b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTest.java
index 6ef2a2f..ab58fdc 100644
--- a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTest.java
+++ b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTest.java
@@ -33,12 +33,16 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.support.DefaultExchange;
 import org.apache.camel.support.ExchangeHelper;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.reactivestreams.Publisher;
 import reactor.core.Disposable;
 import reactor.core.publisher.Flux;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
 public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport {
 
     // ************************************************
@@ -72,7 +76,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         AtomicInteger value = new AtomicInteger(0);
 
         Flux.from(crs.fromStream("numbers", Integer.class))
-            .doOnNext(res -> Assert.assertEquals(value.incrementAndGet(), res.intValue()))
+            .doOnNext(res -> assertEquals(value.incrementAndGet(), res.intValue()))
             .subscribe();
 
         template.sendBody("direct:reactive", 1);
@@ -97,7 +101,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         final AtomicInteger value = new AtomicInteger(0);
 
         Flux.from(crs.fromStream("tick", Integer.class))
-            .doOnNext(res -> Assert.assertEquals(value.incrementAndGet(), res.intValue()))
+            .doOnNext(res -> assertEquals(value.incrementAndGet(), res.intValue()))
             .doOnNext(n -> latch.countDown())
             .subscribe();
 
@@ -105,7 +109,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
 
         latch.await(5, TimeUnit.SECONDS);
 
-        Assert.assertEquals(num, value.get());
+        assertEquals(num, value.get());
     }
 
     @Test
@@ -132,8 +136,8 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         template.sendBody("direct:reactive", 1);
         template.sendBody("direct:reactive", 2);
 
-        Assert.assertTrue(latch1.await(5, TimeUnit.SECONDS));
-        Assert.assertTrue(latch2.await(5, TimeUnit.SECONDS));
+        assertTrue(latch1.await(5, TimeUnit.SECONDS));
+        assertTrue(latch2.await(5, TimeUnit.SECONDS));
     }
 
     @Test
@@ -185,11 +189,11 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
 
         Flux.from(timer)
             .map(exchange -> ExchangeHelper.getHeaderOrProperty(exchange, Exchange.TIMER_COUNTER, Integer.class))
-            .doOnNext(res -> Assert.assertEquals(value.incrementAndGet(), res.intValue()))
+            .doOnNext(res -> assertEquals(value.incrementAndGet(), res.intValue()))
             .doOnNext(res -> latch.countDown())
             .subscribe();
 
-        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));
+        assertTrue(latch.await(2, TimeUnit.SECONDS));
     }
 
     // ************************************************
@@ -222,7 +226,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         );
 
         for (int i = 1; i <= 3; i++) {
-            Assert.assertEquals(
+            assertEquals(
                 "after stream: " + (-i),
                 template.requestBody("direct:source", i, String.class)
             );
@@ -249,7 +253,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         );
 
         for (int i = 1; i <= 3; i++) {
-            Assert.assertEquals(
+            assertEquals(
                 "after stream: " + (-i),
                 template.requestBody("direct:source", i, String.class)
             );
@@ -274,12 +278,12 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
         Publisher<Exchange> publisher = crs.toStream("reactive", new DefaultExchange(context));
         Exchange res = Flux.from(publisher).blockFirst();
 
-        Assert.assertNotNull(res);
+        assertNotNull(res);
 
         String content = res.getIn().getBody(String.class);
 
-        Assert.assertNotNull(content);
-        Assert.assertEquals("123", content);
+        assertNotNull(content);
+        assertEquals("123", content);
     }
 
     @Test
@@ -295,8 +299,8 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
             .doOnNext(res -> latch.countDown())
             .subscribe();
 
-        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));
-        Assert.assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
+        assertTrue(latch.await(2, TimeUnit.SECONDS));
+        assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
     }
 
     @Test
@@ -314,8 +318,8 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
             .doOnNext(res -> latch.countDown())
             .subscribe();
 
-        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));
-        Assert.assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
+        assertTrue(latch.await(2, TimeUnit.SECONDS));
+        assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
     }
 
     @Test
@@ -332,8 +336,8 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
             .doOnNext(res -> latch.countDown())
             .subscribe();
 
-        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));
-        Assert.assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
+        assertTrue(latch.await(2, TimeUnit.SECONDS));
+        assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
     }
 
     @Test
@@ -352,8 +356,8 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
             .doOnNext(res -> latch.countDown())
             .subscribe();
 
-        Assert.assertTrue(latch.await(2, TimeUnit.SECONDS));
-        Assert.assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
+        assertTrue(latch.await(2, TimeUnit.SECONDS));
+        assertEquals(new TreeSet<>(Arrays.asList("Hello 1", "Hello 2", "Hello 3")), values);
     }
 
     // ************************************************
@@ -380,7 +384,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
 
         int idx = 1;
         for (Exchange ex : mock.getExchanges()) {
-            Assert.assertEquals(Integer.valueOf(idx++), ex.getIn().getBody(Integer.class));
+            assertEquals(Integer.valueOf(idx++), ex.getIn().getBody(Integer.class));
         }
     }
 
@@ -388,7 +392,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
     // misc
     // ************************************************
 
-    @Test(expected = FailedToStartRouteException.class)
+    @Test
     public void testOnlyOneCamelProducerPerPublisher() throws Exception {
         context.addRoutes(new RouteBuilder() {
             @Override
@@ -400,6 +404,7 @@ public class ReactorStreamsServiceTest extends ReactorStreamsServiceTestSupport
             }
         });
 
-        context.start();
+        assertThrows(FailedToStartRouteException.class,
+            () -> context.start());
     }
 }
diff --git a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTestSupport.java b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTestSupport.java
index f3065d7..8f2b488 100644
--- a/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTestSupport.java
+++ b/components/camel-reactor/src/test/java/org/apache/camel/component/reactor/engine/ReactorStreamsServiceTestSupport.java
@@ -21,7 +21,7 @@ import org.apache.camel.component.reactive.streams.ReactiveStreamsComponent;
 import org.apache.camel.component.reactive.streams.ReactiveStreamsConstants;
 import org.apache.camel.component.reactive.streams.api.CamelReactiveStreams;
 import org.apache.camel.component.reactive.streams.api.CamelReactiveStreamsService;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.camel.util.ObjectHelper;
 
 class ReactorStreamsServiceTestSupport extends CamelTestSupport {


[camel] 13/18: [CAMEL-11807] Upgrade camel-schematron to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 6b15efd74ea226387ae7c6f8da5b27d4905728c4
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 16:01:41 2020 +0200

    [CAMEL-11807] Upgrade camel-schematron to junit5
---
 components/camel-schematron/pom.xml                            |  2 +-
 .../camel/component/schematron/SchematronComponentTest.java    |  6 ++++--
 .../camel/component/schematron/SchematronEndpointTest.java     |  6 ++++--
 .../camel/component/schematron/SchematronProducerTest.java     | 10 ++++++----
 .../schematron/processor/SchematronProcessorTest.java          |  4 ++--
 .../component/schematron/processor/TemplatesFactoryTest.java   |  7 ++++---
 6 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/components/camel-schematron/pom.xml b/components/camel-schematron/pom.xml
index c460c77..42beec4 100644
--- a/components/camel-schematron/pom.xml
+++ b/components/camel-schematron/pom.xml
@@ -54,7 +54,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronComponentTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronComponentTest.java
index aaa21ca..edec2dc 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronComponentTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronComponentTest.java
@@ -20,9 +20,11 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.schematron.constant.Constants;
 import org.apache.camel.component.schematron.util.Utils;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
  * Schematron Component Test.
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronEndpointTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronEndpointTest.java
index 2d844d8..3309321 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronEndpointTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronEndpointTest.java
@@ -22,9 +22,11 @@ import org.apache.camel.ExchangePattern;
 import org.apache.camel.Producer;
 import org.apache.camel.component.schematron.constant.Constants;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  * Unit test for SchematronEndpoint.
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
index 9a5c273..b7ea955 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/SchematronProducerTest.java
@@ -34,9 +34,11 @@ import org.apache.camel.component.schematron.constant.Constants;
 import org.apache.camel.component.schematron.processor.ClassPathURIResolver;
 import org.apache.camel.component.schematron.processor.TemplatesFactory;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
  * Schematron Producer Unit Test.
@@ -45,7 +47,7 @@ public class SchematronProducerTest extends CamelTestSupport {
 
     private static SchematronProducer producer;
 
-    @BeforeClass
+    @BeforeAll
     public static void setUP() {
         SchematronEndpoint endpoint = new SchematronEndpoint();
         TransformerFactory fac = new TransformerFactoryImpl();
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/SchematronProcessorTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/SchematronProcessorTest.java
index 7d7964d..b0ee701 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/SchematronProcessorTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/SchematronProcessorTest.java
@@ -27,11 +27,11 @@ import net.sf.saxon.TransformerFactoryImpl;
 import org.apache.camel.component.schematron.constant.Constants;
 import org.apache.camel.component.schematron.util.Utils;
 import org.apache.commons.io.IOUtils;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
  * SchematronEngine Unit Test.
diff --git a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/TemplatesFactoryTest.java b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/TemplatesFactoryTest.java
index c008f2f..403fcda 100644
--- a/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/TemplatesFactoryTest.java
+++ b/components/camel-schematron/src/test/java/org/apache/camel/component/schematron/processor/TemplatesFactoryTest.java
@@ -21,8 +21,9 @@ import javax.xml.transform.TransformerFactory;
 
 import net.sf.saxon.TransformerFactoryImpl;
 import org.apache.camel.component.schematron.constant.Constants;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  * TemplateFactory Unit Test.
@@ -38,7 +39,7 @@ public class TemplatesFactoryTest {
         TransformerFactory factory = new TransformerFactoryImpl();
         factory.setURIResolver(new ClassPathURIResolver(Constants.SCHEMATRON_TEMPLATES_ROOT_DIR, null));
         Templates templates = fac.getTemplates(ClassLoader.getSystemResourceAsStream(rules), factory);
-        Assert.assertNotNull(templates);
+        assertNotNull(templates);
 
     }
 }


[camel] 15/18: [CAMEL-11807] Upgrade camel-slack to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d9f66f8b6a61fe770727a48761efa0aa226ec8ac
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 16:05:10 2020 +0200

    [CAMEL-11807] Upgrade camel-slack to junit5
---
 components/camel-slack/pom.xml                        |  2 +-
 .../slack/SlackComponentVerifierExtensionTest.java    | 19 ++++++++++---------
 .../camel/component/slack/SlackConsumerTest.java      | 13 +++++++------
 .../camel/component/slack/SlackProducerTest.java      |  4 ++--
 4 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/components/camel-slack/pom.xml b/components/camel-slack/pom.xml
index 9425817..24ac3e9 100644
--- a/components/camel-slack/pom.xml
+++ b/components/camel-slack/pom.xml
@@ -60,7 +60,7 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
index bcde56a..300d860 100644
--- a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.java
+++ b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackComponentVerifierExtensionTest.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 SlackComponentVerifierExtensionTest extends CamelTestSupport {
 
@@ -46,7 +47,7 @@ public class SlackComponentVerifierExtensionTest 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
@@ -60,7 +61,7 @@ public class SlackComponentVerifierExtensionTest 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
@@ -73,7 +74,7 @@ public class SlackComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
     }
     
     @Test
@@ -88,7 +89,7 @@ public class SlackComponentVerifierExtensionTest extends CamelTestSupport {
 
         ComponentVerifierExtension.Result result = verifier.verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
     }
 
     @Test
@@ -101,7 +102,7 @@ public class SlackComponentVerifierExtensionTest 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());
     }
 
     @Test
@@ -114,6 +115,6 @@ public class SlackComponentVerifierExtensionTest 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-slack/src/test/java/org/apache/camel/component/slack/SlackConsumerTest.java b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackConsumerTest.java
index ad8ec32..7744d69 100644
--- a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackConsumerTest.java
+++ b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackConsumerTest.java
@@ -20,7 +20,7 @@ import java.io.IOException;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.client.HttpClient;
@@ -28,10 +28,11 @@ import org.apache.http.client.methods.HttpPost;
 import org.apache.http.entity.StringEntity;
 import org.apache.http.impl.client.HttpClients;
 import org.hamcrest.CoreMatchers;
-import org.junit.Assert;
 import org.junit.Assume;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class SlackConsumerTest extends CamelTestSupport {
 
@@ -39,7 +40,7 @@ public class SlackConsumerTest extends CamelTestSupport {
     private String hook;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         token = System.getProperty("SLACK_TOKEN");
         hook = System.getProperty("SLACK_HOOK", "https://hooks.slack.com/services/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");
@@ -71,7 +72,7 @@ public class SlackConsumerTest extends CamelTestSupport {
         post.setHeader("Content-type", "application/json");
         post.setEntity(new StringEntity(String.format("{ 'text': '%s'}", message)));
         HttpResponse response = client.execute(post);
-        Assert.assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
+        assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
     }
 
     @Override
diff --git a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
index 4a24b29..dd20289 100644
--- a/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
+++ b/components/camel-slack/src/test/java/org/apache/camel/component/slack/SlackProducerTest.java
@@ -21,8 +21,8 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.direct.DirectEndpoint;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class SlackProducerTest extends CamelTestSupport {
     


[camel] 18/18: [CAMEL-11807] Remove unwanted files

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 50a77427bbf9faee873c6279ef5e66b417602175
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 18:11:07 2020 +0200

    [CAMEL-11807] Remove unwanted files
---
 components/camel-leveldb/leveldb.dat/CURRENT         |   1 -
 components/camel-leveldb/leveldb.dat/LOCK            |   0
 components/camel-leveldb/leveldb.dat/LOG             |   3 ---
 components/camel-leveldb/leveldb.dat/LOG.old         |   1 -
 components/camel-leveldb/leveldb.dat/MANIFEST-000004 | Bin 50 -> 0 bytes
 5 files changed, 5 deletions(-)

diff --git a/components/camel-leveldb/leveldb.dat/CURRENT b/components/camel-leveldb/leveldb.dat/CURRENT
deleted file mode 100644
index cacca75..0000000
--- a/components/camel-leveldb/leveldb.dat/CURRENT
+++ /dev/null
@@ -1 +0,0 @@
-MANIFEST-000004
diff --git a/components/camel-leveldb/leveldb.dat/LOCK b/components/camel-leveldb/leveldb.dat/LOCK
deleted file mode 100644
index e69de29..0000000
diff --git a/components/camel-leveldb/leveldb.dat/LOG b/components/camel-leveldb/leveldb.dat/LOG
deleted file mode 100644
index a98a285..0000000
--- a/components/camel-leveldb/leveldb.dat/LOG
+++ /dev/null
@@ -1,3 +0,0 @@
-2020/07/22-13:45:01.675407 7000081c8000 Recovering log #3
-2020/07/22-13:45:01.676537 7000081c8000 Delete type=0 #3
-2020/07/22-13:45:01.676619 7000081c8000 Delete type=3 #2
diff --git a/components/camel-leveldb/leveldb.dat/LOG.old b/components/camel-leveldb/leveldb.dat/LOG.old
deleted file mode 100644
index de3c694..0000000
--- a/components/camel-leveldb/leveldb.dat/LOG.old
+++ /dev/null
@@ -1 +0,0 @@
-2020/07/22-13:44:04.733946 7000100ae000 Delete type=3 #1
diff --git a/components/camel-leveldb/leveldb.dat/MANIFEST-000004 b/components/camel-leveldb/leveldb.dat/MANIFEST-000004
deleted file mode 100644
index 0a6e923..0000000
Binary files a/components/camel-leveldb/leveldb.dat/MANIFEST-000004 and /dev/null differ


[camel] 07/18: [CAMEL-11807] Upgrade camel-servicenow to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 62416635bd2b4ba2f954be2747f548b02901127a
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:04:43 2020 +0200

    [CAMEL-11807] Upgrade camel-servicenow to junit5
---
 .../camel-servicenow-component/pom.xml             |  6 +-
 .../servicenow/ServiceNowAttachmentTest.java       |  6 +-
 .../ServiceNowComponentVerifierExtensionTest.java  | 71 +++++++++++-----------
 .../ServiceNowComponentVerifierTest.java           | 71 +++++++++++-----------
 .../servicenow/ServiceNowImportSetTest.java        |  9 ++-
 .../ServiceNowMetaDataExtensionTest.java           | 38 ++++++------
 .../servicenow/ServiceNowScorecardTest.java        |  4 +-
 .../servicenow/ServiceNowServiceCatalogTest.java   | 14 +++--
 .../component/servicenow/ServiceNowTableTest.java  |  8 ++-
 .../camel/component/servicenow/ServiceNowTest.java | 21 ++++---
 .../servicenow/ServiceNowTestSupport.java          |  2 +-
 .../camel-servicenow-maven-plugin/pom.xml          |  6 +-
 .../maven/CamelServiceNowGenerateMojoTest.java     |  9 +--
 13 files changed, 149 insertions(+), 116 deletions(-)

diff --git a/components/camel-servicenow/camel-servicenow-component/pom.xml b/components/camel-servicenow/camel-servicenow-component/pom.xml
index b2d4f8a..4e18901 100644
--- a/components/camel-servicenow/camel-servicenow-component/pom.xml
+++ b/components/camel-servicenow/camel-servicenow-component/pom.xml
@@ -102,7 +102,7 @@
 
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -111,8 +111,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowAttachmentTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowAttachmentTest.java
index 2d930cf..ea08d82 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowAttachmentTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowAttachmentTest.java
@@ -26,9 +26,13 @@ import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.servicenow.model.AttachmentMeta;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.apache.camel.support.ResourceHelper.resolveResourceAsInputStream;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class ServiceNowAttachmentTest extends ServiceNowTestSupport {
     @Produce("direct:servicenow")
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtensionTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtensionTest.java
index a36b50c..ce20daf 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtensionTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierExtensionTest.java
@@ -22,8 +22,11 @@ import javax.ws.rs.ProcessingException;
 
 import org.apache.camel.Component;
 import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.junit.Assert;
-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.assertTrue;
 
 public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupport {
     public ServiceNowComponentVerifierExtensionTest() {
@@ -51,7 +54,7 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
         Map<String, Object> parameters = getParameters();
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -60,10 +63,10 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
         parameters.remove("instanceName");
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
-        Assert.assertEquals("instanceName", result.getErrors().get(0).getParameterKeys().iterator().next());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
+        assertEquals("instanceName", result.getErrors().get(0).getParameterKeys().iterator().next());
     }
 
     @Test
@@ -72,10 +75,10 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
         parameters.remove("userName");
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
-        Assert.assertEquals("userName", result.getErrors().get(0).getParameterKeys().iterator().next());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
+        assertEquals("userName", result.getErrors().get(0).getParameterKeys().iterator().next());
     }
 
     // *********************************
@@ -87,7 +90,7 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
         Map<String, Object> parameters = getParameters();
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -97,7 +100,7 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -107,11 +110,11 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ProcessingException);
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ProcessingException);
     }
 
     @Test
@@ -121,12 +124,12 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
     }
 
     @Test
@@ -138,15 +141,15 @@ public class ServiceNowComponentVerifierExtensionTest extends ServiceNowTestSupp
 
         ComponentVerifierExtension.Result result = getExtension().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.AUTHENTICATION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertEquals(401, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("userName"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("password"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientId"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientSecret"));
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.AUTHENTICATION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertEquals(401, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("userName"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("password"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientId"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientSecret"));
     }
 }
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
index 7f4c1ce..21cf4c4 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowComponentVerifierTest.java
@@ -21,8 +21,11 @@ import java.util.Map;
 import javax.ws.rs.ProcessingException;
 
 import org.apache.camel.component.extension.ComponentVerifierExtension;
-import org.junit.Assert;
-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.assertTrue;
 
 public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
     public ServiceNowComponentVerifierTest() {
@@ -47,7 +50,7 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
         Map<String, Object> parameters = getParameters();
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -56,10 +59,10 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
         parameters.remove("instanceName");
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
-        Assert.assertEquals("instanceName", result.getErrors().get(0).getParameterKeys().iterator().next());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
+        assertEquals("instanceName", result.getErrors().get(0).getParameterKeys().iterator().next());
     }
 
     @Test
@@ -68,10 +71,10 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
         parameters.remove("userName");
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.PARAMETERS, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
-        Assert.assertEquals("userName", result.getErrors().get(0).getParameterKeys().iterator().next());
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.MISSING_PARAMETER, result.getErrors().get(0).getCode());
+        assertEquals("userName", result.getErrors().get(0).getParameterKeys().iterator().next());
     }
 
     // *********************************
@@ -83,7 +86,7 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
         Map<String, Object> parameters = getParameters();
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -93,7 +96,7 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
 
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
+        assertEquals(ComponentVerifierExtension.Result.Status.OK, result.getStatus());
     }
 
     @Test
@@ -103,11 +106,11 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
 
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ProcessingException);
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ProcessingException);
     }
 
     @Test
@@ -117,12 +120,12 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
 
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.EXCEPTION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertEquals(400, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
     }
 
     @Test
@@ -134,15 +137,15 @@ public class ServiceNowComponentVerifierTest extends ServiceNowTestSupport {
 
         ComponentVerifierExtension.Result result = getVerifier().verify(ComponentVerifierExtension.Scope.CONNECTIVITY, parameters);
 
-        Assert.assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
-        Assert.assertEquals(1, result.getErrors().size());
-        Assert.assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.AUTHENTICATION, result.getErrors().get(0).getCode());
-        Assert.assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
-        Assert.assertEquals(401, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
-        Assert.assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("userName"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("password"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientId"));
-        Assert.assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientSecret"));
+        assertEquals(ComponentVerifierExtension.Result.Status.ERROR, result.getStatus());
+        assertEquals(1, result.getErrors().size());
+        assertEquals(ComponentVerifierExtension.VerificationError.StandardCode.AUTHENTICATION, result.getErrors().get(0).getCode());
+        assertNotNull(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE));
+        assertEquals(401, result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.HttpAttribute.HTTP_CODE));
+        assertTrue(result.getErrors().get(0).getDetails().get(ComponentVerifierExtension.VerificationError.ExceptionAttribute.EXCEPTION_INSTANCE) instanceof ServiceNowException);
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("userName"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("password"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientId"));
+        assertTrue(result.getErrors().get(0).getParameterKeys().contains("oauthClientSecret"));
     }
 }
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowImportSetTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowImportSetTest.java
index 6b49d89..87b15e8 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowImportSetTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowImportSetTest.java
@@ -29,8 +29,11 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.servicenow.model.ImportSetResult;
 import org.apache.camel.component.servicenow.model.Incident;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  * To set-up ServiceNow for this tests:
@@ -38,7 +41,7 @@ import org.junit.Test;
  * 1. Create a new web service named u_test_imp_incident targeting incident table
  * 2. Create a mapping (automatic)
  */
-@Ignore
+@Disabled
 public class ServiceNowImportSetTest extends ServiceNowTestSupport {
 
     @Test
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtensionTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtensionTest.java
index 0b60f1b..4eb109e 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtensionTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowMetaDataExtensionTest.java
@@ -21,11 +21,14 @@ import java.util.Map;
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.component.extension.MetaDataExtension;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
 public class ServiceNowMetaDataExtensionTest extends ServiceNowTestSupport {
     private static final Logger LOGGER = LoggerFactory.getLogger(ServiceNowMetaDataExtensionTest.class);
 
@@ -63,17 +66,17 @@ public class ServiceNowMetaDataExtensionTest extends ServiceNowTestSupport {
 
         MetaDataExtension.MetaData result = getExtension().meta(parameters).orElseThrow(RuntimeException::new);
 
-        Assert.assertEquals("application/schema+json", result.getAttribute(MetaDataExtension.MetaData.CONTENT_TYPE));
-        Assert.assertNotNull(result.getAttribute("date.format"));
-        Assert.assertNotNull(result.getAttribute("time.format"));
-        Assert.assertNotNull(result.getAttribute("date-time.format"));
-        Assert.assertEquals(JsonNode.class, result.getAttribute(MetaDataExtension.MetaData.JAVA_TYPE));
-        Assert.assertNotNull(result.getPayload(JsonNode.class));
-        Assert.assertNotNull(result.getPayload(JsonNode.class).get("properties"));
-        Assert.assertNotNull(result.getPayload(JsonNode.class).get("$schema"));
-        Assert.assertEquals("http://json-schema.org/schema#", result.getPayload(JsonNode.class).get("$schema").asText());
-        Assert.assertNotNull(result.getPayload(JsonNode.class).get("id"));
-        Assert.assertNotNull(result.getPayload(JsonNode.class).get("type"));
+        assertEquals("application/schema+json", result.getAttribute(MetaDataExtension.MetaData.CONTENT_TYPE));
+        assertNotNull(result.getAttribute("date.format"));
+        assertNotNull(result.getAttribute("time.format"));
+        assertNotNull(result.getAttribute("date-time.format"));
+        assertEquals(JsonNode.class, result.getAttribute(MetaDataExtension.MetaData.JAVA_TYPE));
+        assertNotNull(result.getPayload(JsonNode.class));
+        assertNotNull(result.getPayload(JsonNode.class).get("properties"));
+        assertNotNull(result.getPayload(JsonNode.class).get("$schema"));
+        assertEquals("http://json-schema.org/schema#", result.getPayload(JsonNode.class).get("$schema").asText());
+        assertNotNull(result.getPayload(JsonNode.class).get("id"));
+        assertNotNull(result.getPayload(JsonNode.class).get("type"));
 
         LOGGER.debug(
             new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(result.getPayload())
@@ -92,20 +95,21 @@ public class ServiceNowMetaDataExtensionTest extends ServiceNowTestSupport {
 
         MetaDataExtension.MetaData result = getExtension().meta(parameters).orElseThrow(RuntimeException::new);
 
-        Assert.assertEquals("application/json", result.getAttribute(MetaDataExtension.MetaData.CONTENT_TYPE));
-        Assert.assertEquals(JsonNode.class, result.getAttribute(MetaDataExtension.MetaData.JAVA_TYPE));
+        assertEquals("application/json", result.getAttribute(MetaDataExtension.MetaData.CONTENT_TYPE));
+        assertEquals(JsonNode.class, result.getAttribute(MetaDataExtension.MetaData.JAVA_TYPE));
 
         LOGGER.debug(
             new ObjectMapper().writerWithDefaultPrettyPrinter().writeValueAsString(result.getPayload())
         );
     }
 
-    @Test(expected = UnsupportedOperationException.class)
+    @Test
     public void testInvalidObjectType() throws Exception {
         Map<String, Object> parameters = getParameters();
         parameters.put("objectType", "test");
         parameters.put("objectName", "incident");
 
-        getExtension().meta(parameters);
+        assertThrows(UnsupportedOperationException.class,
+            () -> getExtension().meta(parameters));
     }
 }
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowScorecardTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowScorecardTest.java
index c1ec219..0099b7c 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowScorecardTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowScorecardTest.java
@@ -22,7 +22,9 @@ import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.servicenow.model.Scorecard;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
 
 public class ServiceNowScorecardTest extends ServiceNowTestSupport {
     @Produce("direct:servicenow")
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowServiceCatalogTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowServiceCatalogTest.java
index 4a0403e..8b6c51a 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowServiceCatalogTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowServiceCatalogTest.java
@@ -23,7 +23,10 @@ import org.apache.camel.CamelExecutionException;
 import org.apache.camel.Produce;
 import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class ServiceNowServiceCatalogTest extends ServiceNowTestSupport {
     @Produce("direct:servicenow")
@@ -58,9 +61,10 @@ public class ServiceNowServiceCatalogTest extends ServiceNowTestSupport {
         assertFalse(result2.isEmpty());
     }
 
-    @Test(expected = CamelExecutionException.class)
+    @Test
     public void testWrongSubject() throws Exception {
-        List<Map<?, ?>> result = template.requestBodyAndHeaders(
+        assertThrows(CamelExecutionException.class,
+            () -> template.requestBodyAndHeaders(
             "direct:servicenow",
             null,
             kvBuilder()
@@ -69,9 +73,7 @@ public class ServiceNowServiceCatalogTest extends ServiceNowTestSupport {
                 .put(ServiceNowConstants.ACTION_SUBJECT, "Invalid")
                 .build(),
             List.class
-        );
-
-        assertFalse(result.isEmpty());
+        ));
     }
 
     // *************************************************************************
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java
index 21a748b..8f20e66 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTableTest.java
@@ -24,7 +24,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.servicenow.model.Incident;
 import org.apache.camel.component.servicenow.model.IncidentWithParms;
-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;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class ServiceNowTableTest extends ServiceNowTestSupport {
 
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java
index ac77d68..02d4a28 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTest.java
@@ -28,8 +28,13 @@ import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.servicenow.model.Incident;
-import org.junit.Assert;
-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;
 
 public class ServiceNowTest extends ServiceNowTestSupport {
 
@@ -210,9 +215,9 @@ public class ServiceNowTest extends ServiceNowTestSupport {
 
         DateTimeBean deserialized = mapper.readValue(serialized, DateTimeBean.class);
 
-        Assert.assertEquals(bean.dateTime, deserialized.dateTime);
-        Assert.assertEquals(bean.date, deserialized.date);
-        Assert.assertEquals(bean.time, deserialized.time);
+        assertEquals(bean.dateTime, deserialized.dateTime);
+        assertEquals(bean.date, deserialized.date);
+        assertEquals(bean.time, deserialized.time);
     }
 
     @Test
@@ -229,9 +234,9 @@ public class ServiceNowTest extends ServiceNowTestSupport {
 
         DateTimeBean deserialized = mapper.readValue(serialized, DateTimeBean.class);
 
-        Assert.assertEquals(bean.dateTime, deserialized.dateTime);
-        Assert.assertEquals(bean.date, deserialized.date);
-        Assert.assertEquals(bean.time, deserialized.time);
+        assertEquals(bean.dateTime, deserialized.dateTime);
+        assertEquals(bean.date, deserialized.date);
+        assertEquals(bean.time, deserialized.time);
     }
 
     public static class DateTimeBean {
diff --git a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java
index 6e155df..38d07a8 100644
--- a/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java
+++ b/components/camel-servicenow/camel-servicenow-component/src/test/java/org/apache/camel/component/servicenow/ServiceNowTestSupport.java
@@ -21,7 +21,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.camel.CamelContext;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/components/camel-servicenow/camel-servicenow-maven-plugin/pom.xml b/components/camel-servicenow/camel-servicenow-maven-plugin/pom.xml
index 14c6904..258c83b 100644
--- a/components/camel-servicenow/camel-servicenow-maven-plugin/pom.xml
+++ b/components/camel-servicenow/camel-servicenow-maven-plugin/pom.xml
@@ -147,13 +147,13 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowGenerateMojoTest.java b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowGenerateMojoTest.java
index 70890b2..1794697 100644
--- a/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowGenerateMojoTest.java
+++ b/components/camel-servicenow/camel-servicenow-maven-plugin/src/test/java/org/apache/camel/maven/CamelServiceNowGenerateMojoTest.java
@@ -19,8 +19,9 @@ package org.apache.camel.maven;
 import java.util.Arrays;
 
 import edu.emory.mathcs.backport.java.util.Collections;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class CamelServiceNowGenerateMojoTest extends CamelServiceNowMojoTestSupport {
 
@@ -34,7 +35,7 @@ public class CamelServiceNowGenerateMojoTest extends CamelServiceNowMojoTestSupp
 
         mojo.execute();
 
-        Assert.assertTrue("Output directory was not created", mojo.outputDirectory.exists());
-        Assert.assertTrue("Output directory is empty", mojo.outputDirectory.list().length > 0);
+        assertTrue(mojo.outputDirectory.exists(), "Output directory was not created");
+        assertTrue(mojo.outputDirectory.list().length > 0, "Output directory is empty");
     }
 }


[camel] 09/18: [CAMEL-11807] Upgrade camel-shiro to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8b5e99dd6d21706b397545a6c1ecd933ea423aeb
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:10:18 2020 +0200

    [CAMEL-11807] Upgrade camel-shiro to junit5
---
 components/camel-shiro/pom.xml                                     | 6 +++---
 .../component/shiro/security/ShiroAuthenticationBase64Test.java    | 4 ++--
 .../ShiroAuthenticationReauthenticateFalseAndNewUserTest.java      | 4 ++--
 .../camel/component/shiro/security/ShiroAuthenticationTest.java    | 7 +++++--
 .../camel/component/shiro/security/ShiroAuthorizationTest.java     | 4 ++--
 .../component/shiro/security/ShiroRolesAuthorizationTest.java      | 4 ++--
 6 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/components/camel-shiro/pom.xml b/components/camel-shiro/pom.xml
index 3253612..0005b55 100644
--- a/components/camel-shiro/pom.xml
+++ b/components/camel-shiro/pom.xml
@@ -51,12 +51,12 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationBase64Test.java b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationBase64Test.java
index 3d858fb..082656d 100644
--- a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationBase64Test.java
+++ b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationBase64Test.java
@@ -20,12 +20,12 @@ 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.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.IncorrectCredentialsException;
 import org.apache.shiro.authc.LockedAccountException;
 import org.apache.shiro.authc.UnknownAccountException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class ShiroAuthenticationBase64Test extends CamelTestSupport {
 
diff --git a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationReauthenticateFalseAndNewUserTest.java b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationReauthenticateFalseAndNewUserTest.java
index bbda289..4726ae3 100644
--- a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationReauthenticateFalseAndNewUserTest.java
+++ b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationReauthenticateFalseAndNewUserTest.java
@@ -20,12 +20,12 @@ 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.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.IncorrectCredentialsException;
 import org.apache.shiro.authc.LockedAccountException;
 import org.apache.shiro.authc.UnknownAccountException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class ShiroAuthenticationReauthenticateFalseAndNewUserTest extends CamelTestSupport {
 
diff --git a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationTest.java b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationTest.java
index 48e0408..3e3356f 100644
--- a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationTest.java
+++ b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthenticationTest.java
@@ -24,12 +24,15 @@ 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.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.shiro.authc.AuthenticationException;
 import org.apache.shiro.authc.IncorrectCredentialsException;
 import org.apache.shiro.authc.LockedAccountException;
 import org.apache.shiro.authc.UnknownAccountException;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class ShiroAuthenticationTest extends CamelTestSupport {
 
diff --git a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthorizationTest.java b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthorizationTest.java
index 1f6fb99..69233ca 100644
--- a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthorizationTest.java
+++ b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroAuthorizationTest.java
@@ -24,10 +24,10 @@ 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.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.shiro.authz.Permission;
 import org.apache.shiro.authz.permission.WildcardPermission;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class ShiroAuthorizationTest extends CamelTestSupport {
     
diff --git a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroRolesAuthorizationTest.java b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroRolesAuthorizationTest.java
index e9ee272..78da8e5 100644
--- a/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroRolesAuthorizationTest.java
+++ b/components/camel-shiro/src/test/java/org/apache/camel/component/shiro/security/ShiroRolesAuthorizationTest.java
@@ -24,8 +24,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;
 
 public class ShiroRolesAuthorizationTest extends CamelTestSupport {
     


[camel] 14/18: [CAMEL-11807] Upgrade camel-sip to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a594384e2c4edcf5bddcd32164868d1669fabdc4
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 16:03:05 2020 +0200

    [CAMEL-11807] Upgrade camel-sip to junit5
---
 components/camel-sip/pom.xml                                 |  6 +++---
 .../org/apache/camel/component/sip/PublishSubscribeTest.java | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/components/camel-sip/pom.xml b/components/camel-sip/pom.xml
index 849bdb5..5a6b839 100644
--- a/components/camel-sip/pom.xml
+++ b/components/camel-sip/pom.xml
@@ -54,12 +54,12 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <!-- logging -->
diff --git a/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java b/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
index 80f6212..2928e05 100644
--- a/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
+++ b/components/camel-sip/src/test/java/org/apache/camel/component/sip/PublishSubscribeTest.java
@@ -24,12 +24,12 @@ import org.apache.camel.ProducerTemplate;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
-@Ignore("Test manually as CI server cannot run this test")
+@Disabled("Test manually as CI server cannot run this test")
 public class PublishSubscribeTest extends CamelTestSupport {
 
     private int port1;
@@ -46,7 +46,7 @@ public class PublishSubscribeTest extends CamelTestSupport {
     private ProducerTemplate producerTemplate;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         port1 = AvailablePortFinder.getNextAvailable();
         port2 = AvailablePortFinder.getNextAvailable();


[camel] 04/18: [CAMEL-11807] Upgrade camel-lra to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9554125a185d3a4ef1003db843e0164e24fbaa09
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 13:49:46 2020 +0200

    [CAMEL-11807] Upgrade camel-lra to junit5
---
 components/camel-lra/pom.xml                           |  6 +++---
 .../camel/service/lra/AbstractLRATestSupport.java      | 14 +++++++-------
 .../java/org/apache/camel/service/lra/LRACreditIT.java |  3 ++-
 .../org/apache/camel/service/lra/LRAFailuresIT.java    |  2 +-
 .../java/org/apache/camel/service/lra/LRAManualIT.java |  2 +-
 .../org/apache/camel/service/lra/LRAOptionsIT.java     | 18 ++++++++----------
 .../org/apache/camel/service/lra/LRATimeoutIT.java     |  2 +-
 7 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/components/camel-lra/pom.xml b/components/camel-lra/pom.xml
index c6b1f0f..b1de5f6 100644
--- a/components/camel-lra/pom.xml
+++ b/components/camel-lra/pom.xml
@@ -69,12 +69,12 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/AbstractLRATestSupport.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/AbstractLRATestSupport.java
index c39f0ac..492387a 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/AbstractLRATestSupport.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/AbstractLRATestSupport.java
@@ -28,14 +28,14 @@ import com.fasterxml.jackson.databind.ObjectMapper;
 import org.apache.camel.CamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
 
 import static java.util.concurrent.TimeUnit.SECONDS;
 import static org.awaitility.Awaitility.await;
 import static org.hamcrest.Matchers.equalTo;
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 /**
  * Base class for LRA based tests.
@@ -46,15 +46,15 @@ public abstract class AbstractLRATestSupport extends CamelTestSupport {
 
     private int activeLRAs;
 
-    @Before
+    @BeforeEach
     public void getActiveLRAs() throws IOException {
         this.activeLRAs = getNumberOfActiveLRAs();
     }
 
-    @After
+    @AfterEach
     public void checkActiveLRAs() throws IOException {
         await().atMost(2, SECONDS).until(() -> getNumberOfActiveLRAs(), equalTo(activeLRAs));
-        Assert.assertEquals("Some LRA have been left pending", activeLRAs, getNumberOfActiveLRAs());
+        assertEquals(activeLRAs, getNumberOfActiveLRAs(), "Some LRA have been left pending");
     }
 
     @Override
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRACreditIT.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRACreditIT.java
index 4485c74..50ed72c 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRACreditIT.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRACreditIT.java
@@ -26,10 +26,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Header;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.model.SagaPropagation;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 import static org.awaitility.Awaitility.await;
 import static org.hamcrest.Matchers.equalTo;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class LRACreditIT extends AbstractLRATestSupport {
 
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAFailuresIT.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAFailuresIT.java
index ad4f9d0..752c4da 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAFailuresIT.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAFailuresIT.java
@@ -20,7 +20,7 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class LRAFailuresIT extends AbstractLRATestSupport {
 
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAManualIT.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAManualIT.java
index 7cc6ec5..ea43586 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAManualIT.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAManualIT.java
@@ -23,7 +23,7 @@ import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.SagaCompletionMode;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class LRAManualIT extends AbstractLRATestSupport {
 
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAOptionsIT.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAOptionsIT.java
index f5b884e..c2a0557 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAOptionsIT.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRAOptionsIT.java
@@ -20,8 +20,9 @@ import org.apache.camel.Exchange;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.junit.Assert;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
 
 public class LRAOptionsIT extends AbstractLRATestSupport {
 
@@ -48,19 +49,16 @@ public class LRAOptionsIT extends AbstractLRATestSupport {
         compensate.expectedHeaderReceived("name", "Nicola");
         compensate.expectedMessagesMatches(ex -> ex.getIn().getHeader(Exchange.SAGA_LONG_RUNNING_ACTION) != null);
 
-        try {
-            template.sendBodyAndHeader("direct:workflow", "compensate", "myname", "Nicola");
-            Assert.fail("Should throw an exception");
-        } catch (Exception ex) {
-            // OK
-        }
+        assertThrows(Exception.class,
+            () -> template.sendBodyAndHeader("direct:workflow", "compensate", "myname", "Nicola"));
 
         compensate.assertIsSatisfied();
     }
 
-    @Test(expected = RuntimeCamelException.class)
+    @Test
     public void testRouteDoesNotHangOnOptionError() throws Exception {
-        template.sendBody("direct:wrong-expression", "Hello");
+        assertThrows(RuntimeCamelException.class,
+            () -> template.sendBody("direct:wrong-expression", "Hello"));
     }
 
     @Override
diff --git a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRATimeoutIT.java b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRATimeoutIT.java
index 1a16a12..517e7ce 100644
--- a/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRATimeoutIT.java
+++ b/components/camel-lra/src/test/java/org/apache/camel/service/lra/LRATimeoutIT.java
@@ -21,7 +21,7 @@ import java.util.concurrent.TimeUnit;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.model.SagaCompletionMode;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class LRATimeoutIT extends AbstractLRATestSupport {
 


[camel] 16/18: [CAMEL-11807] Upgrade camel-snakeyaml to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit e896b25a3ae0f1f3105ec90ea8f07372433d80bf
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 16:18:37 2020 +0200

    [CAMEL-11807] Upgrade camel-snakeyaml to junit5
---
 components/camel-snakeyaml/pom.xml                 |  6 ++---
 .../component/snakeyaml/SnakeYAMLDoSTest.java      |  8 +++++--
 .../component/snakeyaml/SnakeYAMLSpringTest.java   |  4 ++--
 .../snakeyaml/SnakeYAMLSpringTypeFilterTest.java   |  4 ++--
 .../camel/component/snakeyaml/SnakeYAMLTest.java   | 28 ++++++++++------------
 .../component/snakeyaml/SnakeYAMLTestHelper.java   |  4 ++--
 .../snakeyaml/SnakeYAMLTypeFilterHelper.java       |  6 ++---
 .../snakeyaml/SnakeYAMLTypeFilterTest.java         |  4 ++--
 .../snakeyaml/SnakeYAMLUnmarshalTypeTest.java      |  7 ++++--
 9 files changed, 38 insertions(+), 33 deletions(-)

diff --git a/components/camel-snakeyaml/pom.xml b/components/camel-snakeyaml/pom.xml
index 8392dea..aafb3e5 100644
--- a/components/camel-snakeyaml/pom.xml
+++ b/components/camel-snakeyaml/pom.xml
@@ -44,7 +44,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -53,8 +53,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
index e2a41aa..bc4ae60 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLDoSTest.java
@@ -24,11 +24,15 @@ import org.apache.camel.CamelExecutionException;
 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 org.yaml.snakeyaml.Yaml;
 import org.yaml.snakeyaml.constructor.SafeConstructor;
 
+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 SnakeYAMLDoSTest extends CamelTestSupport {
 
     @Test
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTest.java
index 95cbf36..cf7c474 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTest.java
@@ -19,8 +19,8 @@ package org.apache.camel.component.snakeyaml;
 import java.util.HashMap;
 import java.util.Map;
 
-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.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.test.annotation.DirtiesContext;
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTypeFilterTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTypeFilterTest.java
index b93a046..1d59419 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTypeFilterTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLSpringTypeFilterTest.java
@@ -16,8 +16,8 @@
  */
 package org.apache.camel.component.snakeyaml;
 
-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.AbstractXmlApplicationContext;
 import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.test.annotation.DirtiesContext;
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
index bfc43a8..76b6e4a 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTest.java
@@ -21,10 +21,11 @@ import java.util.Collection;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.snakeyaml.model.TestPojo;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.apache.camel.test.junit5.params.Parameter;
+import org.apache.camel.test.junit5.params.Parameterized;
+import org.apache.camel.test.junit5.params.Parameters;
+import org.apache.camel.test.junit5.params.Test;
 import org.yaml.snakeyaml.nodes.Tag;
 
 import static org.apache.camel.component.snakeyaml.SnakeYAMLTestHelper.createClassTagDataFormat;
@@ -33,20 +34,17 @@ import static org.apache.camel.component.snakeyaml.SnakeYAMLTestHelper.createPre
 import static org.apache.camel.component.snakeyaml.SnakeYAMLTestHelper.createTestMap;
 import static org.apache.camel.component.snakeyaml.SnakeYAMLTestHelper.createTestPojo;
 
-@RunWith(Parameterized.class)
+@Parameterized
 public class SnakeYAMLTest extends CamelTestSupport {
 
-    private final SnakeYAMLDataFormat format;
-    private final Object body;
-    private final String expected;
+    @Parameter
+    private SnakeYAMLDataFormat format;
+    @Parameter(1)
+    private Object body;
+    @Parameter(2)
+    private String expected;
 
-    public SnakeYAMLTest(SnakeYAMLDataFormat format, Object body, String expected) {
-        this.format = format;
-        this.body = body;
-        this.expected = expected;
-    }
-
-    @Parameterized.Parameters
+    @Parameters
     public static Collection yamlCases() {
         return Arrays.asList(new Object[][] {
             {
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTestHelper.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTestHelper.java
index cd00e1f..185762a 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTestHelper.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTestHelper.java
@@ -25,8 +25,8 @@ import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.snakeyaml.model.TestPojo;
 import org.yaml.snakeyaml.nodes.Tag;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public final class SnakeYAMLTestHelper {
 
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
index c03fd73..708da04 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterHelper.java
@@ -23,9 +23,9 @@ import org.apache.camel.component.snakeyaml.model.TestPojo;
 import org.apache.camel.component.snakeyaml.model.UnsafePojo;
 import org.yaml.snakeyaml.constructor.ConstructorException;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public final class SnakeYAMLTypeFilterHelper {
     private SnakeYAMLTypeFilterHelper() {
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
index 0fb6536..7bb9513 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLTypeFilterTest.java
@@ -20,8 +20,8 @@ import java.util.Arrays;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.snakeyaml.model.TestPojo;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class SnakeYAMLTypeFilterTest extends CamelTestSupport {
     @Test
diff --git a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
index c6fb99c..a36bc1c 100644
--- a/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
+++ b/components/camel-snakeyaml/src/test/java/org/apache/camel/component/snakeyaml/SnakeYAMLUnmarshalTypeTest.java
@@ -18,8 +18,11 @@ package org.apache.camel.component.snakeyaml;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.snakeyaml.model.TestPojo;
-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.assertTrue;
 
 public class SnakeYAMLUnmarshalTypeTest extends CamelTestSupport {
     @Test


[camel] 12/18: [CAMEL-11807] Upgrade camel-xslt-saxon to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3e77be673d8d348c3d1dabae347ac4da8a52d214
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:58:57 2020 +0200

    [CAMEL-11807] Upgrade camel-xslt-saxon to junit5
---
 components/camel-xslt-saxon/pom.xml                                | 2 +-
 .../apache/camel/component/xslt/saxon/SAXSourceLogBodyTest.java    | 4 ++--
 .../java/org/apache/camel/component/xslt/saxon/XsltSaxonTest.java  | 7 +++++--
 3 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/components/camel-xslt-saxon/pom.xml b/components/camel-xslt-saxon/pom.xml
index 6235288..95b77d1 100644
--- a/components/camel-xslt-saxon/pom.xml
+++ b/components/camel-xslt-saxon/pom.xml
@@ -51,7 +51,7 @@
 
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/SAXSourceLogBodyTest.java b/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/SAXSourceLogBodyTest.java
index 30356b3..0d75695 100644
--- a/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/SAXSourceLogBodyTest.java
+++ b/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/SAXSourceLogBodyTest.java
@@ -29,8 +29,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.LoggingLevel;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class SAXSourceLogBodyTest extends CamelTestSupport {
 
diff --git a/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/XsltSaxonTest.java b/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/XsltSaxonTest.java
index db74664..f5cf0ec 100644
--- a/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/XsltSaxonTest.java
+++ b/components/camel-xslt-saxon/src/test/java/org/apache/camel/component/xslt/saxon/XsltSaxonTest.java
@@ -24,8 +24,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.converter.jaxp.XmlConverter;
-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.assertTrue;
 
 public class XsltSaxonTest extends CamelTestSupport {
 


[camel] 11/18: [CAMEL-11807] Upgrade camel-velocity to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit be6d4e84e5474208803112a51a0f4221a69932aa
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 15:38:30 2020 +0200

    [CAMEL-11807] Upgrade camel-velocity to junit5
---
 components/camel-velocity/pom.xml                          |  6 +++---
 .../component/velocity/VelocityBodyAsDomainObjectTest.java |  4 ++--
 .../camel/component/velocity/VelocityConcurrentTest.java   |  6 ++++--
 .../camel/component/velocity/VelocityContentCacheTest.java |  8 ++++----
 .../component/velocity/VelocityDynamicTemplateTest.java    |  4 ++--
 .../camel/component/velocity/VelocityLetterTest.java       |  4 ++--
 .../component/velocity/VelocityMethodInvokationTest.java   |  6 ++++--
 .../velocity/VelocityOverridesPropertiesTest.java          |  6 ++++--
 .../camel/component/velocity/VelocitySetHeaderTest.java    |  4 ++--
 .../velocity/VelocitySetTemplateViaHeaderTest.java         |  4 ++--
 .../velocity/VelocitySomeValuesNotInExchangeTest.java      |  4 ++--
 .../velocity/VelocitySupplementalContextTest.java          |  4 ++--
 .../component/velocity/VelocityTemplateInHeaderTest.java   | 14 +++++++++-----
 .../org/apache/camel/component/velocity/VelocityTest.java  |  6 ++++--
 .../component/velocity/VelocityValuesInPropertiesTest.java |  4 ++--
 15 files changed, 48 insertions(+), 36 deletions(-)

diff --git a/components/camel-velocity/pom.xml b/components/camel-velocity/pom.xml
index a97f85b..5bbc582 100644
--- a/components/camel-velocity/pom.xml
+++ b/components/camel-velocity/pom.xml
@@ -47,7 +47,7 @@
         <!-- test dependencies -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test-spring</artifactId>
+            <artifactId>camel-test-spring-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -61,8 +61,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java
index 1d28334..57503c3 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityBodyAsDomainObjectTest.java
@@ -18,8 +18,8 @@ package org.apache.camel.component.velocity;
 
 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;
 
 /**
  * Unit test with the body as a Domain object.
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
index 7abf3de..b3ce96c 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityConcurrentTest.java
@@ -21,8 +21,10 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.test.junit5.TestSupport.body;
 
 public class VelocityConcurrentTest extends CamelTestSupport {
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
index 926232e..3bbc35c 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityContentCacheTest.java
@@ -25,9 +25,9 @@ import javax.management.ObjectName;
 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.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 /**
  * Unit test the cache when reloading .vm files in the classpath
@@ -35,7 +35,7 @@ import org.junit.Test;
 public class VelocityContentCacheTest extends CamelTestSupport {
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() throws Exception {
         super.setUp();
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
index afd3b95..529a09f 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityDynamicTemplateTest.java
@@ -21,8 +21,8 @@ import org.apache.camel.Message;
 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;
 
 public class VelocityDynamicTemplateTest extends CamelTestSupport {
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
index 12792e7..13c486e 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityLetterTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 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;
 
 /**
  * Unit test for wiki documentation
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
index e79d3f2..3a9da13 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityMethodInvokationTest.java
@@ -19,9 +19,11 @@ package org.apache.camel.component.velocity;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.velocity.tools.generic.EscapeTool;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class VelocityMethodInvokationTest extends CamelTestSupport {
     
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
index 48938d6..9c29b77 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityOverridesPropertiesTest.java
@@ -19,8 +19,10 @@ package org.apache.camel.component.velocity;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.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 VelocityOverridesPropertiesTest extends CamelTestSupport {
     
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
index 24ccfd3..58bce5a 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetHeaderTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 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;
 
 public class VelocitySetHeaderTest extends CamelSpringTestSupport {
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
index 1873d76..b6285e4 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySetTemplateViaHeaderTest.java
@@ -20,8 +20,8 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Message;
 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;
 
 public class VelocitySetTemplateViaHeaderTest extends CamelTestSupport {
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
index 8db3252..6adace3 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySomeValuesNotInExchangeTest.java
@@ -21,8 +21,8 @@ import java.util.Map;
 
 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;
 
 /**
  * Unit test with some variables missing.
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
index cd774a8..0289f0a 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocitySupplementalContextTest.java
@@ -24,8 +24,8 @@ import org.apache.camel.Produce;
 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;
 
 public class VelocitySupplementalContextTest extends CamelTestSupport {
 
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
index 5486cbc..692b13f 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTemplateInHeaderTest.java
@@ -24,8 +24,12 @@ import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.Message;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-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.apache.camel.test.junit5.TestSupport.assertMessageBodyEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class VelocityTemplateInHeaderTest extends CamelTestSupport {
 
@@ -57,10 +61,10 @@ public class VelocityTemplateInHeaderTest extends CamelTestSupport {
                 in.setHeader(headerName, headerValue);
             }
         });
-        assertOutMessageBodyEquals(response, expectedBody);
+        assertMessageBodyEquals(response, expectedBody);
 
         Object template = response.getMessage().getHeader(VelocityConstants.VELOCITY_TEMPLATE);
-        assertNull("Template header should have been removed", template);
+        assertNull(template, "Template header should have been removed");
 
         Set<Entry<String, Object>> entrySet = response.getMessage().getHeaders().entrySet();
         boolean keyFound = false;
@@ -69,7 +73,7 @@ public class VelocityTemplateInHeaderTest extends CamelTestSupport {
                 keyFound = true;
             }
         }
-        assertTrue("Header should been found", keyFound);
+        assertTrue(keyFound, "Header should been found");
     }
 
     @Override
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
index 4145f12..57627f4 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityTest.java
@@ -22,9 +22,11 @@ import java.util.Map;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.test.junit5.CamelTestSupport;
 import org.apache.velocity.VelocityContext;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class VelocityTest extends CamelTestSupport {
     
diff --git a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
index 755bb0c..9d31d9a 100644
--- a/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
+++ b/components/camel-velocity/src/test/java/org/apache/camel/component/velocity/VelocityValuesInPropertiesTest.java
@@ -21,8 +21,8 @@ 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;
 
 public class VelocityValuesInPropertiesTest extends CamelTestSupport {
     


[camel] 05/18: [CAMEL-11807] Upgrade camel-reactive-executor-vertx to junit5

Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit d4e4fee26ea3bf75f91f3e287772cb26e41498a7
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Jul 22 13:52:38 2020 +0200

    [CAMEL-11807] Upgrade camel-reactive-executor-vertx to junit5
---
 components/camel-reactive-executor-vertx/pom.xml                    | 6 +++---
 .../java/org/apache/camel/reactive/SimpleMockLookupVertxTest.java   | 4 ++--
 .../src/test/java/org/apache/camel/reactive/SimpleMockTest.java     | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/components/camel-reactive-executor-vertx/pom.xml b/components/camel-reactive-executor-vertx/pom.xml
index 725af79..13a9673 100644
--- a/components/camel-reactive-executor-vertx/pom.xml
+++ b/components/camel-reactive-executor-vertx/pom.xml
@@ -54,7 +54,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -68,8 +68,8 @@
             <scope>test</scope>
         </dependency>
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.junit.jupiter</groupId>
+            <artifactId>junit-jupiter</artifactId>
             <scope>test</scope>
         </dependency>
     </dependencies>
diff --git a/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockLookupVertxTest.java b/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockLookupVertxTest.java
index 79683fc..583c16e 100644
--- a/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockLookupVertxTest.java
+++ b/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockLookupVertxTest.java
@@ -20,8 +20,8 @@ import io.vertx.core.Vertx;
 import org.apache.camel.CamelContext;
 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;
 
 public class SimpleMockLookupVertxTest extends CamelTestSupport {
 
diff --git a/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockTest.java b/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockTest.java
index 2a39514..3730dbb 100644
--- a/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockTest.java
+++ b/components/camel-reactive-executor-vertx/src/test/java/org/apache/camel/reactive/SimpleMockTest.java
@@ -22,8 +22,8 @@ import org.apache.camel.ExtendedCamelContext;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.reactive.vertx.VertXReactiveExecutor;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
 
 public class SimpleMockTest extends CamelTestSupport {