You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by al...@apache.org on 2019/08/12 17:24:36 UTC

[camel] branch CAMEL-13826 updated (9fbfea4 -> 603665b)

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

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


 discard 9fbfea4  CAMEL-13826: Turned TestSupport into a utility class
     add 330d52b  CAMEL-13589: remove references to Wiki
     add 22ac12b  CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Added migration guide note
     add 0d870f5  Upgrade Jnats to version 2.6.0
     add 853d381  CAMEL-13837: FactoryFinder API should avoid throwing exceptions for n… (#3089)
     add f1d9443  Upgrade MyBatis
     add e1526e2  CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Updated camel-grape docs
     add 087b5a7  Stream caching should be able to init with camel-quarkus out of the box
     add 7981824  CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Removed netty-http4 decorator for aws-xray component
     add de3b6ee  CAMEL-13792 - Rename components to default names, Camel-netty4-http to camel-netty-http - Removed netty-http4 decorator for opentracing component
     add 9ea5498  Regen
     add b83833c  CAMEL-13792: Fixed issue with camel-rest-swagger and renaming http components and some flaws with settign up rest configuration
     add fce66e0  Fixed example as swagger petstorre uses https now and http4 works OOTB where as undertow dont
     add 698f6bc  CAMEL-13787: Remove twitter-streaming component
     add 115049e  Upgrade OWASP Maven Plugin to version 5.2.1
     add ee00206  Restore ability to run Spring Boot itests with unitTestEnabled=true
     add 0f3d8e6  Fixed secret in apt compiler plugin and allow to set it via @UriPath as well
     add b7810a9  CAMEL-13845: camel-telegram - Do not show authorizationToken in uri. CAMEL-13847: camel-webhook - Should be lenient properties and fixed creating delegate uri with right set of parameters.
     add b60bc82  Upgrade migration guide
     add 4b34ad0  Fixed MIGRATION guide with hdfs correct scheme
     add 21b774a  CAMEL-13839: replace all NO-BREAK SPACE with SPACE
     add 075f3a2  Remove link to twitter-streaming-component
     add a429059  CAMEL-13846: Make PropertyBindingSupport a fluent builder only
     add 1a5f8b2  CAMEL-13792: Fixed issue with camel-rest-swagger and renaming http components and some flaws with settign up rest configuration
     add 5a7dca4  CAMEL-13846: Make PropertyBindingSupport a fluent builder only
     add de8e3ef  CAMEL-13846: Make PropertyBindingSupport a fluent builder only
     add 3fa336d  CAMEL-13846: Make PropertyBindingSupport a fluent builder only
     add f7ec6e1  Upgraded consul docker image
     add abcd877  Fixed camel-atmos and polished
     add 7337198  CAMEL-13848: Add room password to camel-xmpp. Thanks to Tapio Piironen for the patch.
     add 5b408b9  Fixed CS for Camel-Twitter
     add ab08e6e  CAMEL-13786: add delivery delay to jms component
     add dd29fb0  CAMEL-13786: regen
     add 4c2f7fb  CAMEL-13786: Integration test for JMS 2.0 deliveryDelay
     add 1063c77  Regen
     add 8745711  CAMEL-13798: additional title fixes
     add daf9d25  CAMEL-13854: camel-microprofile-config: service file point to the wrong class
     add 43643fd  CAMEL-13855: camel-microprofile-config: discover properties sources from registry
     add 91c40c9  CAMEL-13856: camel-microprofile-config: sould have an option to enable/disable automatic lookup of properties sources
     add e2564f3  CAMEL-13857: camel-microprofile-config: should implement LoadablePropertiesSource
     add 43389ad  CAMEL-13858: camel-properties: load properties should iterate through loadable property source in reverse order
     add 08c6192  CAMEL-13859: came-properties: allow to filter properties by key when loading all
     add 8b25edf  CAMEL-13860: camel-properties: get[Inital|Override]Properties should never return null
     add b6208d8  CAMEL-13800: fix some issues in mobile resolutions
     new 5c7e318  CAMEL-13826: Turned TestSupport into a utility class
     new ab05cfe  CAMEL-13826: Removed deprecated methods and class
     new 4459363  CAMEL-13826: Moved route coverage to a dedicated class
     new 603665b  CAMEL-13826: rough migration of the camel-ahc component. To be polished, squashed and rebased

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

 * -- * -- B -- O -- O -- O   (9fbfea4)
            \
             N -- N -- N   refs/heads/CAMEL-13826 (603665b)

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

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

The 4 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:
 MIGRATION.md                                       |  19 +-
 .../src/main/docs/activemq-component.adoc          |   3 +-
 .../src/main/docs/ahc-ws-component.adoc            |  12 +-
 components/camel-ahc/pom.xml                       |   7 +-
 .../camel-ahc/src/main/docs/ahc-component.adoc     |   4 +-
 .../ahc/AhcBridgeEndpointPathWithSpacesTest.java   |   6 +-
 .../camel/component/ahc/AhcBridgeEndpointTest.java |  12 +-
 .../component/ahc/AhcClientConfigRealmUriTest.java |   4 +-
 .../component/ahc/AhcClientConfigUriTest.java      |   4 +-
 .../ahc/AhcComponentClientConfigTest.java          |   2 +-
 ...entConfigWithClientConfigUriParametersTest.java |   5 +-
 .../ahc/AhcComponentCustomClientConfigTest.java    |   2 +-
 .../ahc/AhcComponentNettyClientConfigTest.java     |   2 +-
 .../apache/camel/component/ahc/AhcGoogleTest.java  |   8 +-
 .../ahc/AhcOperationFailedExceptionTest.java       |   4 +-
 .../camel/component/ahc/AhcProduce500Test.java     |   9 +-
 .../component/ahc/AhcProduceClientConfigTest.java  |   2 +-
 ...entConfigWithClientConfigUriParametersTest.java |   5 +-
 .../component/ahc/AhcProduceGetHeadersTest.java    |   2 +-
 .../ahc/AhcProduceGetNoSlashInUriTest.java         |   2 +-
 .../camel/component/ahc/AhcProduceGetTest.java     |   4 +-
 .../AhcProduceNoThrowExceptionOnFailureTest.java   |   2 +-
 .../component/ahc/AhcProducePostDoWhileTest.java   |   2 +-
 .../component/ahc/AhcProducePostHeadersTest.java   |   2 +-
 .../camel/component/ahc/AhcProducePostTest.java    |   4 +-
 .../ahc/AhcProduceTransferExceptionTest.java       |   9 +-
 ...hcProduceWithClientConfigUriParametersTest.java |   2 +-
 .../ahc/AhcProducerConnectionCloseHeadersTest.java |   2 +-
 .../component/ahc/AhcProducerSessionTest.java      |   2 +-
 .../AhcProducerTwoParametersWithSameKeyTest.java   |  10 +-
 .../apache/camel/component/ahc/BaseAhcTest.java    |   6 +-
 .../camel/component/ahc/HttpEndpointURLTest.java   |   6 +-
 .../ahc/HttpHeaderFilterStrategyTest.java          |  11 +-
 .../ahc/javabody/AhcProduceJavaBodyTest.java       |   8 +-
 .../camel-amqp/src/main/docs/amqp-component.adoc   |  25 +-
 .../camel-apns/src/main/docs/apns-component.adoc   |   4 +-
 .../src/main/docs/as2-component.adoc               |  28 +-
 .../camel-atmos/src/main/docs/atmos-component.adoc |  12 +-
 .../camel/component/atmos/AtmosComponent.java      |   8 +-
 .../camel/component/atmos/AtmosConfiguration.java  |  22 +-
 .../camel/component/atmos/AtmosEndpoint.java       |   2 -
 .../camel/component/atmos/AtmosComponentTest.java  |   6 +-
 .../camel/component/atmos/AtmosConsumerTest.java   |  15 +-
 .../main/docs/atmosphere-websocket-component.adoc  |  15 +-
 .../camel-avro/src/main/docs/avro-component.adoc   |  10 +-
 .../src/main/docs/aws-cw-component.adoc            |   2 +-
 .../src/main/docs/aws-ddbstream-component.adoc     |  12 +-
 .../src/main/docs/aws-kinesis-component.adoc       |   6 +-
 .../main/docs/aws-kinesis-firehose-component.adoc  |   6 +-
 .../src/main/docs/aws-sns-component.adoc           |   2 +-
 .../src/main/docs/aws-swf-component.adoc           |   6 +-
 .../http/NettyHttp4SegmentDecorator.java           |  25 --
 ...pache.camel.component.aws.xray.SegmentDecorator |   1 -
 components/camel-azure/src/main/docs/azure.adoc    |   2 +-
 .../src/main/docs/barcode-dataformat.adoc          |   4 +-
 .../src/main/docs/bean-validator-component.adoc    |   4 +-
 .../camel-bean/src/main/docs/bean-language.adoc    |   4 +-
 .../src/main/docs/beanstalk-component.adoc         |  38 +--
 .../src/main/docs/bindy-dataformat.adoc            |   8 +-
 .../src/main/docs/box-component.adoc               |  74 ++---
 .../src/main/docs/braintree-component.adoc         | 308 ++++++++++----------
 .../src/main/docs/caffeine-cache-component.adoc    |   6 +-
 .../main/docs/caffeine-loadcache-component.adoc    |   6 +-
 .../src/main/docs/cql-component.adoc               |   6 +-
 .../camel-cbor/src/main/docs/cbor-dataformat.adoc  |   6 +-
 components/camel-cdi/src/main/docs/cdi.adoc        | 132 ++++-----
 .../camel-chunk/src/main/docs/chunk-component.adoc |  22 +-
 .../src/main/docs/cm-sms-component.adoc            |   8 +-
 .../camel-coap/src/main/docs/coap-component.adoc   |   8 +-
 .../src/main/docs/cometd-component.adoc            |   6 +-
 .../camel/component/consul/ConsulTestSupport.java  |   2 +-
 .../camel-crypto/src/main/docs/pgp-dataformat.adoc |  10 +-
 .../src/main/docs/cxf-transport.adoc               |   6 +-
 .../camel-cxf/src/main/docs/cxf-component.adoc     |  20 +-
 .../camel-cxf/src/main/docs/cxfrs-component.adoc   |  22 +-
 .../src/main/docs/dataset-component.adoc           |  14 +-
 .../src/main/docs/docker-component.adoc            |   2 +-
 .../camel-dozer/src/main/docs/dozer-component.adoc |  48 ++--
 .../src/main/docs/dropbox-component.adoc           |  10 +-
 .../src/main/docs/ehcache-component.adoc           |  14 +-
 .../main/docs/elasticsearch-rest-component.adoc    |   6 +-
 .../camel-elsql/src/main/docs/elsql-component.adoc |  16 +-
 .../src/main/docs/facebook-component.adoc          |  21 +-
 .../camel-file/src/main/docs/file-component.adoc   |  12 +-
 .../camel/component/file/GenericFileEndpoint.java  |   4 +-
 .../camel-flink/src/main/docs/flink-component.adoc |   4 +-
 .../camel-fop/src/main/docs/fop-component.adoc     |   2 +-
 .../camel-ftp/src/main/docs/ftp-component.adoc     |  12 +-
 .../src/main/docs/ganglia-component.adoc           |  16 +-
 .../camel-git/src/main/docs/git-component.adoc     |   2 +-
 .../src/main/docs/github-component.adoc            |   6 +-
 .../src/main/docs/google-bigquery-component.adoc   |   2 +-
 .../main/docs/google-bigquery-sql-component.adoc   |   2 +-
 .../src/main/docs/google-calendar-component.adoc   |  16 +-
 .../docs/google-calendar-stream-component.adoc     |  18 +-
 .../src/main/docs/google-drive-component.adoc      |  10 +-
 .../src/main/docs/google-mail-component.adoc       |  18 +-
 .../main/docs/google-mail-stream-component.adoc    |  16 +-
 .../src/main/docs/google-pubsub-component.adoc     |   2 +-
 .../src/main/docs/google-sheets-component.adoc     |  18 +-
 .../main/docs/google-sheets-stream-component.adoc  |  16 +-
 .../camel-gora/src/main/docs/gora-component.adoc   |  24 +-
 .../camel-grape/src/main/docs/grape-component.adoc |  40 +--
 .../src/main/docs/groovy-language.adoc             |   4 +-
 .../src/main/docs/hazelcast-list-component.adoc    |   2 +-
 .../docs/hazelcast-replicatedmap-component.adoc    |   8 +-
 .../main/docs/hazelcast-ringbuffer-component.adoc  |   6 +-
 .../src/main/docs/hazelcast-topic-component.adoc   |   2 +-
 .../camel-hazelcast/src/main/docs/hazelcast.adoc   |   6 +-
 .../camel-hdfs/src/main/docs/hdfs-component.adoc   |   4 +-
 .../src/main/docs/hipchat-component.adoc           |  10 +-
 .../camel-hl7/src/main/docs/hl7-dataformat.adoc    |  16 +-
 .../src/main/docs/hl7terser-language.adoc          |   2 +-
 .../camel-http/src/main/docs/http-component.adoc   |  10 +-
 .../camel/component/http4/HttpComponent.java       |   8 +-
 .../camel-irc/src/main/docs/irc-component.adoc     |   4 +-
 .../src/main/docs/jacksonxml-dataformat.adoc       |  54 ++--
 components/camel-jasypt/src/main/docs/jasypt.adoc  |  16 +-
 .../camel-jaxb/src/main/docs/jaxb-dataformat.adoc  |   8 +-
 .../camel-jbpm/src/main/docs/jbpm-component.adoc   |   2 +-
 .../camel-jcr/src/main/docs/jcr-component.adoc     |   2 +-
 .../camel-jetty/src/main/docs/jetty-component.adoc |  13 +-
 .../src/main/docs/jgroups-raft-component.adoc      |   8 +-
 .../src/main/docs/jgroups-component.adoc           |  12 +-
 .../camel-jira/src/main/docs/jira-component.adoc   |  12 +-
 .../camel-jms/src/main/docs/jms-component.adoc     |  26 +-
 .../camel/component/jms/JmsConfiguration.java      |  32 ++-
 .../camel-jolt/src/main/docs/jolt-component.adoc   |  14 +-
 .../camel-jpa/src/main/docs/jpa-component.adoc     |   4 +-
 .../camel-jsch/src/main/docs/scp-component.adoc    |   2 +-
 .../src/main/docs/jsonpath-language.adoc           |   8 +-
 .../camel-kafka/src/main/docs/kafka-component.adoc |   4 +-
 .../docs/kubernetes-config-maps-component.adoc     |   2 +-
 .../docs/kubernetes-deployments-component.adoc     |   2 +-
 .../src/main/docs/kubernetes-hpa-component.adoc    |   2 +-
 .../src/main/docs/kubernetes-job-component.adoc    |   2 +-
 .../main/docs/kubernetes-namespaces-component.adoc |   2 +-
 .../src/main/docs/kubernetes-nodes-component.adoc  |   2 +-
 ...rnetes-persistent-volumes-claims-component.adoc |   2 +-
 .../kubernetes-persistent-volumes-component.adoc   |   2 +-
 .../src/main/docs/kubernetes-pods-component.adoc   |   2 +-
 ...bernetes-replication-controllers-component.adoc |   2 +-
 .../docs/kubernetes-resources-quota-component.adoc |   2 +-
 .../main/docs/kubernetes-secrets-component.adoc    |   2 +-
 .../kubernetes-service-accounts-component.adoc     |   2 +-
 .../main/docs/kubernetes-services-component.adoc   |   2 +-
 .../camel-kubernetes/src/main/docs/kubernetes.adoc |   4 +-
 .../docs/openshift-build-configs-component.adoc    |   2 +-
 .../src/main/docs/openshift-builds-component.adoc  |   2 +-
 components/camel-kura/src/main/docs/kura.adoc      |  26 +-
 .../camel-ldap/src/main/docs/ldap-component.adoc   |   2 +-
 .../src/main/docs/linkedin-component.adoc          |  82 +++---
 .../camel-log/src/main/docs/log-component.adoc     |  18 +-
 .../camel-lzf/src/main/docs/lzf-dataformat.adoc    |  20 +-
 .../camel-mail/src/main/docs/mail-component.adoc   |   8 +-
 .../src/main/docs/mime-multipart-dataformat.adoc   |   2 +-
 .../src/main/docs/metrics-component.adoc           |  56 ++--
 .../src/main/docs/micrometer-component.adoc        |  58 ++--
 components/camel-microprofile-config/pom.xml       |   5 +
 .../config/CamelMicroProfilePropertiesSource.java  |  49 +++-
 .../org/apache/camel/properties-source-factory     |   2 +-
 .../CamelMicroProfilePropertiesSourceTest.java     |  47 +++-
 .../camel-mina/src/main/docs/mina-component.adoc   |   4 +-
 .../camel-mllp/src/main/docs/mllp-component.adoc   |  58 ++--
 .../camel-mock/src/main/docs/mock-component.adoc   |   4 +-
 .../src/main/docs/mongodb-gridfs-component.adoc    |   8 +-
 .../src/main/docs/mongodb-component.adoc           |  10 +-
 .../src/main/docs/mybatis-component.adoc           |   6 +-
 .../camel-nats/src/main/docs/nats-component.adoc   |   8 +-
 .../src/main/docs/netty-http-component.adoc        |  10 +-
 .../component/netty4/http/NettyHttpComponent.java  |   9 +-
 .../camel-netty/src/main/docs/netty-component.adoc |  10 +-
 .../camel-nsq/src/main/docs/nsq-component.adoc     |   6 +-
 .../src/main/docs/olingo2-component.adoc           |  68 ++---
 .../src/main/docs/olingo4-component.adoc           |  56 ++--
 .../camel-openstack/src/main/docs/openstack.adoc   |   2 +-
 .../src/main/docs/opentracing.adoc                 |   4 +-
 .../decorators/NettyHttp4SpanDecorator.java        |  26 --
 .../org.apache.camel.opentracing.SpanDecorator     |   1 -
 .../src/main/docs/optaplanner-component.adoc       |   2 +-
 .../camel-paho/src/main/docs/paho-component.adoc   |   6 +-
 .../camel-pdf/src/main/docs/pdf-component.adoc     |   4 +-
 .../src/main/docs/properties-component.adoc        |  27 +-
 .../AbstractLocationPropertiesSource.java          |  14 +
 .../component/properties/PropertiesComponent.java  | 116 ++++++--
 .../src/main/docs/pulsar-component.adoc            |   2 +-
 .../src/main/docs/quartz-component.adoc            |  14 +-
 .../src/main/docs/quickfix-component.adoc          |   2 +-
 .../src/main/docs/rabbitmq-component.adoc          |   2 +-
 .../reactive/streams/ReactiveStreamsHelper.java    |  11 +-
 .../rest/swagger/RestSwaggerEndpoint.java          |   9 +-
 .../rest/swagger/RestSwaggerEndpointTest.java      |  14 +-
 .../camel-rest/src/main/docs/rest-component.adoc   |   8 +-
 .../camel/component/rest/RestApiEndpoint.java      |  21 +-
 .../apache/camel/component/rest/RestEndpoint.java  |  14 +-
 .../src/main/docs/restlet-component.adoc           |   2 +-
 .../camel-saxon/src/main/docs/xquery-language.adoc |   2 +-
 .../src/main/docs/scheduler-component.adoc         |  14 +-
 .../src/main/docs/schematron-component.adoc        |  12 +-
 .../src/main/docs/servicenow-component.adoc        |   4 +-
 .../camel-slack/src/main/docs/slack-component.adoc |   6 +-
 .../camel-smpp/src/main/docs/smpp-component.adoc   |  66 ++---
 .../src/main/docs/yaml-snakeyaml-dataformat.adoc   |  18 +-
 .../src/main/docs/spark-rest-component.adoc        |   6 +-
 .../camel-spark/src/main/docs/spark-component.adoc |  60 ++--
 .../src/main/docs/splunk-component.adoc            |   4 +-
 .../src/main/docs/spring-boot.adoc                 |  64 ++---
 .../spring/boot/util/CamelPropertiesHelper.java    |   5 +-
 .../src/main/docs/spring-cloud-netflix.adoc        |   2 +-
 .../src/main/docs/spring-cloud.adoc                |   2 +-
 .../src/main/docs/spring-redis-component.adoc      |   2 +-
 components/camel-spring/src/main/docs/spring.adoc  |   4 +-
 .../camel-sql/src/main/docs/sql-component.adoc     |  36 +--
 .../src/main/docs/sql-stored-component.adoc        |   4 +-
 .../src/main/docs/swagger-java.adoc                |  18 +-
 .../src/main/docs/syslog-dataformat.adoc           |  13 +-
 .../src/main/docs/tarfile-dataformat.adoc          |  10 +-
 .../src/main/docs/telegram-component.adoc          |   8 +-
 .../component/telegram/TelegramComponent.java      |  21 +-
 .../component/telegram/TelegramConfiguration.java  |  32 +--
 .../camel/component/telegram/TelegramEndpoint.java |   2 +-
 .../component/telegram/TelegramChatBotTest.java    |   4 +-
 .../telegram/TelegramComponentParametersTest.java  |   4 +-
 .../telegram/TelegramConfigurationTest.java        |   3 +-
 .../telegram/TelegramConsumerChannelPostTest.java  |   2 +-
 .../TelegramConsumerEmptyResponseTest.java         |   2 +-
 .../TelegramConsumerFallbackConversionTest.java    |   2 +-
 .../telegram/TelegramConsumerMappingTest.java      |   2 +-
 .../TelegramConsumerMediaDocumentTest.java         |   2 +-
 .../telegram/TelegramConsumerMediaPhotoTest.java   |   2 +-
 .../telegram/TelegramConsumerMediaVideoTest.java   |   2 +-
 .../telegram/TelegramConsumerMultipleTest.java     |   2 +-
 .../telegram/TelegramConsumerServiceErrorTest.java |   2 +-
 .../telegram/TelegramConsumerSingleTest.java       |   2 +-
 .../TelegramProducerChatIdResolutionTest.java      |   2 +-
 .../telegram/TelegramProducerLocationTest.java     |   2 +-
 .../telegram/TelegramProducerMediaTest.java        |   2 +-
 .../telegram/TelegramWebhookCallTest.java          |   2 +-
 .../telegram/TelegramWebhookRegistrationTest.java  |   4 +-
 .../src/main/docs/test-blueprint.adoc              |  16 +-
 .../src/main/docs/test-junit5.adoc                 |  27 ++
 .../camel/test/CamelRouteCoverageDumper.java       | 190 +++++++++++++
 .../apache/camel/test/junit5/CamelTestSupport.java | 237 +---------------
 .../patterns/DebugNoLazyTypeConverterTest.java     |   5 -
 .../RouteProcessorDumpRouteCoverageTest.java       |  20 +-
 .../src/test/resources/jndi.properties             |  22 --
 .../spring/ContainerAwareSpringTestSupportIT.java  |   2 +-
 .../ContainerAwareTestSupportIT.java               |   2 +-
 .../camel-timer/src/main/docs/timer-component.adoc |   2 +-
 .../src/main/docs/twilio-component.adoc            |   8 +-
 components/camel-twitter/pom.xml                   |   5 -
 .../main/docs/twitter-directmessage-component.adoc |  17 +-
 .../src/main/docs/twitter-search-component.adoc    |  17 +-
 .../src/main/docs/twitter-streaming-component.adoc | 141 ----------
 .../src/main/docs/twitter-timeline-component.adoc  |  17 +-
 .../camel-twitter/src/main/docs/twitter.adoc       | 149 ----------
 .../component/twitter/AbstractTwitterEndpoint.java |   5 +-
 .../component/twitter/TwitterConfiguration.java    |  52 +---
 .../consumer/AbstractTwitterConsumerHandler.java   |   4 +-
 .../twitter/consumer/DefaultTwitterConsumer.java   |  34 +--
 .../camel/component/twitter/data/ConsumerType.java |   2 +-
 .../camel/component/twitter/data/EndpointType.java |   2 +-
 .../component/twitter/data/StreamingType.java      |  29 --
 .../AbstractStreamingConsumerHandler.java          | 128 ---------
 .../streaming/FilterStreamingConsumerHandler.java  |  80 ------
 .../streaming/SampleStreamingConsumerHandler.java  |  40 ---
 .../streaming/TwitterStreamingComponent.java       |  48 ----
 .../streaming/TwitterStreamingEndpoint.java        |  84 ------
 .../streaming/UserStreamingConsumerHandler.java    | 226 ---------------
 .../camel/component/twitter/SearchEventTest.java   |  91 ------
 .../TwitterComponentVerifierExtensionTest.java     |  24 --
 .../twitter/TwitterComponentVerifierTest.java      |  24 --
 .../component/twitter/UriConfigurationTest.java    |  18 --
 .../camel/component/twitter/UserStreamingTest.java |  49 ----
 .../deprecated/DirectMessageDirectTest.java        |  53 ----
 .../deprecated/DirectMessagePollingTest.java       |  52 ----
 .../twitter/deprecated/HomeTimeLineDirectTest.java |  38 ---
 .../deprecated/HomeTimeLinePollingTest.java        |  37 ---
 .../deprecated/SearchByExchangeDirectTest.java     | 140 ----------
 .../twitter/deprecated/SearchDirectTest.java       |  38 ---
 .../twitter/deprecated/SearchEventTest.java        |  93 -------
 .../twitter/deprecated/SearchPollingTest.java      |  37 ---
 .../twitter/deprecated/UserProducerInOnlyTest.java |  79 ------
 .../twitter/deprecated/UserProducerInOutTest.java  |  84 ------
 .../twitter/deprecated/UserStreamingTest.java      |  51 ----
 .../twitter/deprecated/UserTimeLineDirectTest.java |  38 ---
 .../deprecated/UserTimeLinePollingTest.java        |  38 ---
 ...terStreamingComponentVerifierExtensionTest.java |  26 --
 .../TwitterStreamingComponentVerifierTest.java     |  26 --
 .../src/main/docs/undertow-component.adoc          |   5 +-
 .../component/undertow/UndertowComponent.java      |   9 +-
 .../src/main/docs/univocity-csv-dataformat.adoc    |  18 +-
 .../src/main/docs/univocity-fixed-dataformat.adoc  |  18 +-
 .../src/main/docs/univocity-tsv-dataformat.adoc    |  18 +-
 .../src/main/docs/validator-component.adoc         |   2 +-
 .../src/main/docs/velocity-component.adoc          |   4 +-
 .../src/main/docs/weather-component.adoc           |   2 +-
 .../camel/component/webhook/WebhookComponent.java  |   5 +-
 .../camel/component/webhook/WebhookEndpoint.java   |   5 +
 .../src/main/docs/websocket-component.adoc         |   6 +-
 .../src/main/docs/xmlsecurity-component.adoc       |  68 ++---
 .../camel-xmpp/src/main/docs/xmpp-component.adoc   |   5 +-
 .../apache/camel/component/xmpp/XmppEndpoint.java  |  13 +
 .../component/xmpp/XmppGroupChatProducer.java      |  12 +-
 .../camel-xslt/src/main/docs/xslt-component.adoc   |  12 +-
 .../src/main/docs/json-xstream-dataformat.adoc     |   4 +-
 .../src/main/docs/xstream-dataformat.adoc          |   8 +-
 .../src/main/docs/zendesk-component.adoc           |   2 +-
 .../src/main/docs/gzipdeflater-dataformat.adoc     |   4 +-
 .../src/main/docs/zipdeflater-dataformat.adoc      |   6 +-
 .../src/main/docs/zipfile-dataformat.adoc          |   8 +-
 components/camel-zipkin/src/main/docs/zipkin.adoc  |  20 +-
 components/readme.adoc                             |   7 +-
 .../java/org/apache/camel/spi/FactoryFinder.java   |  31 +--
 .../apache/camel/spi/LoadablePropertiesSource.java |   9 +
 .../org/apache/camel/spi/PropertiesComponent.java  |  16 +-
 core/camel-base/src/main/docs/simple-language.adoc |   4 +-
 .../src/main/docs/tokenize-language.adoc           |   6 +-
 .../impl/converter/BaseTypeConverterRegistry.java  |  52 +++-
 .../camel/impl/engine/AbstractCamelContext.java    | 181 +++++-------
 .../impl/engine/BeanProcessorFactoryResolver.java  |   4 +-
 .../impl/engine/BeanProxyFactoryResolver.java      |   4 +-
 .../impl/engine/DefaultComponentResolver.java      |   4 +-
 .../impl/engine/DefaultDataFormatResolver.java     |   6 +-
 .../camel/impl/engine/DefaultFactoryFinder.java    | 123 +++-----
 .../camel/impl/engine/DefaultLanguageResolver.java |   4 +-
 .../camel/impl/engine/DefaultProcessorFactory.java |  14 +-
 .../impl/engine/DefaultStreamCachingStrategy.java  |  34 ++-
 .../impl/engine/HeadersMapFactoryResolver.java     |   4 +-
 .../impl/engine/ReactiveExecutorResolver.java      |   4 +-
 .../impl/engine/RestRegistryFactoryResolver.java   |   4 +-
 .../camel/processor/SendDynamicAwareResolver.java  |   4 +-
 .../impl/cloud/ServiceCallProcessorFactory.java    |   2 +-
 .../apache/camel/core/osgi/OsgiFactoryFinder.java  |  14 +-
 .../camel/core/osgi/OsgiFactoryFinderTest.java     |  15 +-
 .../src/main/docs/eips/aggregate-eip.adoc          |  34 +--
 .../main/docs/eips/eventDrivenConsumer-eip.adoc    |   8 +-
 .../camel-core/src/main/docs/eips/process-eip.adoc |   3 +-
 .../src/main/docs/eips/rollback-eip.adoc           |  12 +-
 core/camel-core/src/main/docs/eips/toD-eip.adoc    |  20 +-
 .../camel-core/src/main/docs/eips/wireTap-eip.adoc |  12 +-
 .../org/apache/camel/impl/DefaultCamelContext.java |   8 +-
 .../cloud/ServiceCallExpressionConfiguration.java  |   4 +-
 .../ServiceCallServiceChooserConfiguration.java    |   4 +-
 .../ServiceCallServiceDiscoveryConfiguration.java  |   4 +-
 .../ServiceCallServiceFilterConfiguration.java     |   4 +-
 ...erviceCallServiceLoadBalancerConfiguration.java |   4 +-
 .../camel/reifier/rest/RestBindingReifier.java     |   2 +-
 .../PropertiesComponentPropertiesSourceTest.java   | 145 ++++++++++
 .../impl/engine/DefaultFactoryFinderTest.java      |  62 +----
 ...=> StreamCachingSpoolDirectoryQuarkusTest.java} |  28 +-
 ...opertyBindingSupportAutowireNestedDeepTest.java |   2 +-
 .../PropertyBindingSupportAutowireNestedTest.java  |  10 +-
 .../PropertyBindingSupportAutowireTest.java        |   2 +-
 .../support/PropertyBindingSupportListTest.java    |   8 +-
 .../support/PropertyBindingSupportMapTest.java     |   8 +-
 .../camel/support/PropertyBindingSupportTest.java  | 111 +++++---
 .../builder/endpoint/EndpointBuilderFactory.java   |   1 -
 .../endpoint/dsl/AMQPEndpointBuilderFactory.java   |  24 ++
 .../dsl/ActiveMQEndpointBuilderFactory.java        |  25 ++
 .../endpoint/dsl/AtmosEndpointBuilderFactory.java  | 309 ++++++++++-----------
 .../endpoint/dsl/JmsEndpointBuilderFactory.java    |  24 ++
 .../dsl/TelegramEndpointBuilderFactory.java        |  44 ++-
 ...TwitterDirectMessageEndpointBuilderFactory.java |  84 ++----
 .../dsl/TwitterSearchEndpointBuilderFactory.java   |  84 ++----
 .../TwitterStreamingEndpointBuilderFactory.java    | 256 -----------------
 .../dsl/TwitterTimelineEndpointBuilderFactory.java |  84 ++----
 .../endpoint/dsl/XmppEndpointBuilderFactory.java   |  33 +++
 .../src/main/docs/xtokenize-language.adoc          |   2 +-
 .../java/org/apache/camel/main/MainSupport.java    |  10 +-
 .../management/JmxManagementStrategyFactory.java   |   2 +-
 .../DefaultComponentVerifierExtension.java         |   2 +-
 .../org/apache/camel/support/DefaultComponent.java |   2 +-
 .../org/apache/camel/support/DefaultEndpoint.java  |   2 +-
 .../org/apache/camel/support/EndpointHelper.java   |   2 +-
 .../camel/support/PropertyBindingSupport.java      | 258 ++++++++---------
 .../camel/support/RestProducerFactoryHelper.java   |   6 +-
 .../camel/support/ScheduledPollConsumer.java       |   4 +-
 .../support/component/AbstractApiComponent.java    |   2 +-
 .../java/org/apache/camel/util/URISupport.java     |   2 +-
 .../java/org/apache/camel/util/URISupportTest.java |  12 +-
 docs/components/modules/ROOT/nav.adoc              |   4 +-
 .../modules/ROOT/pages/activemq-component.adoc     |   3 +-
 .../modules/ROOT/pages/ahc-component.adoc          |   4 +-
 .../modules/ROOT/pages/ahc-ws-component.adoc       |  12 +-
 .../modules/ROOT/pages/amqp-component.adoc         |  25 +-
 .../modules/ROOT/pages/apns-component.adoc         |   4 +-
 .../modules/ROOT/pages/as2-component.adoc          |  28 +-
 .../modules/ROOT/pages/atmos-component.adoc        |  12 +-
 .../ROOT/pages/atmosphere-websocket-component.adoc |  15 +-
 .../modules/ROOT/pages/avro-component.adoc         |  10 +-
 .../modules/ROOT/pages/aws-cw-component.adoc       |   2 +-
 .../ROOT/pages/aws-ddbstream-component.adoc        |  12 +-
 .../modules/ROOT/pages/aws-kinesis-component.adoc  |   6 +-
 .../ROOT/pages/aws-kinesis-firehose-component.adoc |   6 +-
 .../modules/ROOT/pages/aws-sns-component.adoc      |   2 +-
 .../modules/ROOT/pages/aws-swf-component.adoc      |   6 +-
 docs/components/modules/ROOT/pages/azure.adoc      |   2 +-
 .../modules/ROOT/pages/barcode-dataformat.adoc     |   4 +-
 .../modules/ROOT/pages/bean-language.adoc          |   4 +-
 .../ROOT/pages/bean-validator-component.adoc       |   4 +-
 .../modules/ROOT/pages/beanstalk-component.adoc    |  38 +--
 .../modules/ROOT/pages/bindy-dataformat.adoc       |   8 +-
 .../modules/ROOT/pages/box-component.adoc          |  74 ++---
 .../modules/ROOT/pages/braintree-component.adoc    | 308 ++++++++++----------
 .../ROOT/pages/caffeine-cache-component.adoc       |   6 +-
 .../ROOT/pages/caffeine-loadcache-component.adoc   |   6 +-
 .../modules/ROOT/pages/cbor-dataformat.adoc        |   6 +-
 docs/components/modules/ROOT/pages/cdi.adoc        | 132 ++++-----
 .../modules/ROOT/pages/chunk-component.adoc        |  22 +-
 .../modules/ROOT/pages/cm-sms-component.adoc       |   8 +-
 .../modules/ROOT/pages/coap-component.adoc         |   8 +-
 .../modules/ROOT/pages/cometd-component.adoc       |   6 +-
 .../modules/ROOT/pages/cql-component.adoc          |   6 +-
 .../modules/ROOT/pages/cxf-component.adoc          |  20 +-
 .../modules/ROOT/pages/cxf-transport.adoc          |   6 +-
 .../modules/ROOT/pages/cxfrs-component.adoc        |  22 +-
 .../modules/ROOT/pages/dataset-component.adoc      |  14 +-
 .../modules/ROOT/pages/docker-component.adoc       |   2 +-
 .../modules/ROOT/pages/dozer-component.adoc        |  48 ++--
 .../modules/ROOT/pages/dropbox-component.adoc      |  10 +-
 .../modules/ROOT/pages/ehcache-component.adoc      |  14 +-
 .../ROOT/pages/elasticsearch-rest-component.adoc   |   6 +-
 .../modules/ROOT/pages/elsql-component.adoc        |  16 +-
 .../modules/ROOT/pages/facebook-component.adoc     |  21 +-
 .../modules/ROOT/pages/file-component.adoc         |  12 +-
 .../modules/ROOT/pages/flink-component.adoc        |   4 +-
 .../modules/ROOT/pages/fop-component.adoc          |   2 +-
 .../modules/ROOT/pages/ftp-component.adoc          |  12 +-
 .../modules/ROOT/pages/ganglia-component.adoc      |  16 +-
 .../modules/ROOT/pages/git-component.adoc          |   2 +-
 .../modules/ROOT/pages/github-component.adoc       |   6 +-
 .../ROOT/pages/google-bigquery-component.adoc      |   2 +-
 .../ROOT/pages/google-bigquery-sql-component.adoc  |   2 +-
 .../ROOT/pages/google-calendar-component.adoc      |  16 +-
 .../pages/google-calendar-stream-component.adoc    |  18 +-
 .../modules/ROOT/pages/google-drive-component.adoc |  10 +-
 .../modules/ROOT/pages/google-mail-component.adoc  |  18 +-
 .../ROOT/pages/google-mail-stream-component.adoc   |  16 +-
 .../ROOT/pages/google-pubsub-component.adoc        |   2 +-
 .../ROOT/pages/google-sheets-component.adoc        |  18 +-
 .../ROOT/pages/google-sheets-stream-component.adoc |  16 +-
 .../modules/ROOT/pages/gora-component.adoc         |  24 +-
 .../modules/ROOT/pages/grape-component.adoc        |  40 +--
 .../modules/ROOT/pages/groovy-language.adoc        |   4 +-
 .../ROOT/pages/gzipdeflater-dataformat.adoc        |   4 +-
 .../ROOT/pages/hazelcast-list-component.adoc       |   2 +-
 .../pages/hazelcast-replicatedmap-component.adoc   |   8 +-
 .../ROOT/pages/hazelcast-ringbuffer-component.adoc |   6 +-
 .../ROOT/pages/hazelcast-topic-component.adoc      |   2 +-
 docs/components/modules/ROOT/pages/hazelcast.adoc  |   6 +-
 .../modules/ROOT/pages/hdfs-component.adoc         |   4 +-
 .../modules/ROOT/pages/hipchat-component.adoc      |  10 +-
 .../modules/ROOT/pages/hl7-dataformat.adoc         |  16 +-
 .../modules/ROOT/pages/hl7terser-language.adoc     |   2 +-
 .../modules/ROOT/pages/http-component.adoc         |  10 +-
 .../modules/ROOT/pages/irc-component.adoc          |   4 +-
 .../modules/ROOT/pages/jacksonxml-dataformat.adoc  |  54 ++--
 docs/components/modules/ROOT/pages/jasypt.adoc     |  16 +-
 .../modules/ROOT/pages/jaxb-dataformat.adoc        |   8 +-
 .../modules/ROOT/pages/jbpm-component.adoc         |   2 +-
 .../modules/ROOT/pages/jcr-component.adoc          |   2 +-
 .../modules/ROOT/pages/jetty-component.adoc        |  13 +-
 .../modules/ROOT/pages/jgroups-component.adoc      |  12 +-
 .../modules/ROOT/pages/jgroups-raft-component.adoc |   8 +-
 .../modules/ROOT/pages/jira-component.adoc         |  12 +-
 .../modules/ROOT/pages/jms-component.adoc          |  26 +-
 .../modules/ROOT/pages/jolt-component.adoc         |  14 +-
 .../modules/ROOT/pages/jpa-component.adoc          |   4 +-
 .../ROOT/pages/json-xstream-dataformat.adoc        |   4 +-
 .../modules/ROOT/pages/jsonpath-language.adoc      |   8 +-
 .../modules/ROOT/pages/kafka-component.adoc        |   4 +-
 .../pages/kubernetes-config-maps-component.adoc    |   2 +-
 .../pages/kubernetes-deployments-component.adoc    |   2 +-
 .../ROOT/pages/kubernetes-hpa-component.adoc       |   2 +-
 .../ROOT/pages/kubernetes-job-component.adoc       |   2 +-
 .../pages/kubernetes-namespaces-component.adoc     |   2 +-
 .../ROOT/pages/kubernetes-nodes-component.adoc     |   2 +-
 ...rnetes-persistent-volumes-claims-component.adoc |   2 +-
 .../kubernetes-persistent-volumes-component.adoc   |   2 +-
 .../ROOT/pages/kubernetes-pods-component.adoc      |   2 +-
 ...bernetes-replication-controllers-component.adoc |   2 +-
 .../kubernetes-resources-quota-component.adoc      |   2 +-
 .../ROOT/pages/kubernetes-secrets-component.adoc   |   2 +-
 .../kubernetes-service-accounts-component.adoc     |   2 +-
 .../ROOT/pages/kubernetes-services-component.adoc  |   2 +-
 docs/components/modules/ROOT/pages/kubernetes.adoc |   4 +-
 docs/components/modules/ROOT/pages/kura.adoc       |  26 +-
 .../modules/ROOT/pages/ldap-component.adoc         |   2 +-
 .../modules/ROOT/pages/linkedin-component.adoc     |  82 +++---
 .../modules/ROOT/pages/log-component.adoc          |  18 +-
 .../modules/ROOT/pages/lzf-dataformat.adoc         |  20 +-
 .../modules/ROOT/pages/mail-component.adoc         |   8 +-
 .../modules/ROOT/pages/metrics-component.adoc      |  56 ++--
 .../modules/ROOT/pages/micrometer-component.adoc   |  58 ++--
 .../ROOT/pages/mime-multipart-dataformat.adoc      |   2 +-
 .../modules/ROOT/pages/mina-component.adoc         |   4 +-
 .../modules/ROOT/pages/mllp-component.adoc         |  58 ++--
 .../modules/ROOT/pages/mock-component.adoc         |   4 +-
 .../modules/ROOT/pages/mongodb-component.adoc      |  10 +-
 .../ROOT/pages/mongodb-gridfs-component.adoc       |   8 +-
 .../modules/ROOT/pages/mybatis-component.adoc      |   6 +-
 .../modules/ROOT/pages/nats-component.adoc         |   8 +-
 .../modules/ROOT/pages/netty-component.adoc        |  10 +-
 .../modules/ROOT/pages/netty-http-component.adoc   |  10 +-
 .../modules/ROOT/pages/nsq-component.adoc          |   6 +-
 .../modules/ROOT/pages/olingo2-component.adoc      |  68 ++---
 .../modules/ROOT/pages/olingo4-component.adoc      |  56 ++--
 .../pages/openshift-build-configs-component.adoc   |   2 +-
 .../ROOT/pages/openshift-builds-component.adoc     |   2 +-
 docs/components/modules/ROOT/pages/openstack.adoc  |   2 +-
 .../components/modules/ROOT/pages/opentracing.adoc |   4 +-
 .../modules/ROOT/pages/optaplanner-component.adoc  |   2 +-
 .../modules/ROOT/pages/paho-component.adoc         |   6 +-
 .../modules/ROOT/pages/pdf-component.adoc          |   4 +-
 .../modules/ROOT/pages/pgp-dataformat.adoc         |  10 +-
 .../modules/ROOT/pages/properties-component.adoc   |  24 +-
 .../modules/ROOT/pages/pulsar-component.adoc       |   2 +-
 .../modules/ROOT/pages/quartz-component.adoc       |  14 +-
 .../modules/ROOT/pages/quickfix-component.adoc     |   2 +-
 .../modules/ROOT/pages/rabbitmq-component.adoc     |   2 +-
 .../modules/ROOT/pages/rest-component.adoc         |   8 +-
 .../modules/ROOT/pages/restlet-component.adoc      |   2 +-
 .../modules/ROOT/pages/scheduler-component.adoc    |  14 +-
 .../modules/ROOT/pages/schematron-component.adoc   |  12 +-
 .../modules/ROOT/pages/scp-component.adoc          |   2 +-
 .../modules/ROOT/pages/servicenow-component.adoc   |   4 +-
 .../modules/ROOT/pages/slack-component.adoc        |   6 +-
 .../modules/ROOT/pages/smpp-component.adoc         |  66 ++---
 .../modules/ROOT/pages/spark-component.adoc        |  60 ++--
 .../modules/ROOT/pages/spark-rest-component.adoc   |   6 +-
 .../modules/ROOT/pages/splunk-component.adoc       |   4 +-
 .../components/modules/ROOT/pages/spring-boot.adoc |  64 ++---
 .../modules/ROOT/pages/spring-cloud-netflix.adoc   |   2 +-
 .../modules/ROOT/pages/spring-cloud.adoc           |   2 +-
 .../modules/ROOT/pages/spring-redis-component.adoc |   2 +-
 docs/components/modules/ROOT/pages/spring.adoc     |   4 +-
 .../modules/ROOT/pages/sql-component.adoc          |  36 +--
 .../modules/ROOT/pages/sql-stored-component.adoc   |   4 +-
 .../modules/ROOT/pages/swagger-java.adoc           |  18 +-
 .../modules/ROOT/pages/syslog-dataformat.adoc      |  13 +-
 .../modules/ROOT/pages/tarfile-dataformat.adoc     |  10 +-
 .../modules/ROOT/pages/telegram-component.adoc     |   8 +-
 .../modules/ROOT/pages/test-blueprint.adoc         |  16 +-
 .../modules/ROOT/pages/timer-component.adoc        |   2 +-
 .../modules/ROOT/pages/twilio-component.adoc       |   8 +-
 .../pages/twitter-directmessage-component.adoc     |  17 +-
 .../ROOT/pages/twitter-search-component.adoc       |  17 +-
 .../ROOT/pages/twitter-streaming-component.adoc    | 141 ----------
 .../ROOT/pages/twitter-timeline-component.adoc     |  17 +-
 docs/components/modules/ROOT/pages/twitter.adoc    | 149 ----------
 .../modules/ROOT/pages/undertow-component.adoc     |   5 +-
 .../ROOT/pages/univocity-csv-dataformat.adoc       |  18 +-
 .../ROOT/pages/univocity-fixed-dataformat.adoc     |  18 +-
 .../ROOT/pages/univocity-tsv-dataformat.adoc       |  18 +-
 .../modules/ROOT/pages/validator-component.adoc    |   2 +-
 .../modules/ROOT/pages/velocity-component.adoc     |   4 +-
 .../modules/ROOT/pages/weather-component.adoc      |   2 +-
 .../modules/ROOT/pages/websocket-component.adoc    |   6 +-
 .../modules/ROOT/pages/xmlsecurity-component.adoc  |  68 ++---
 .../modules/ROOT/pages/xmpp-component.adoc         |   5 +-
 .../modules/ROOT/pages/xquery-language.adoc        |   2 +-
 .../modules/ROOT/pages/xslt-component.adoc         |  12 +-
 .../modules/ROOT/pages/xstream-dataformat.adoc     |   8 +-
 .../ROOT/pages/yaml-snakeyaml-dataformat.adoc      |  18 +-
 .../modules/ROOT/pages/zendesk-component.adoc      |   2 +-
 .../modules/ROOT/pages/zipdeflater-dataformat.adoc |   6 +-
 .../modules/ROOT/pages/zipfile-dataformat.adoc     |   8 +-
 docs/components/modules/ROOT/pages/zipkin.adoc     |  20 +-
 .../modules/ROOT/pages/aggregate-eip.adoc          |  34 +--
 .../modules/ROOT/pages/bean-binding.adoc           |  44 +--
 docs/user-manual/modules/ROOT/pages/books.adoc     |  20 +-
 docs/user-manual/modules/ROOT/pages/building.adoc  |   4 +-
 .../ROOT/pages/camel-configuration-utilities.adoc  | 120 ++++----
 .../user-manual/modules/ROOT/pages/camel-core.adoc |   2 +-
 .../modules/ROOT/pages/camel-jar-dependencies.adoc |   6 +-
 .../modules/ROOT/pages/camel-run-maven-goal.adoc   |   8 +-
 .../ROOT/pages/commercial-camel-offerings.adoc     |   8 +-
 .../modules/ROOT/pages/configuring-camel.adoc      |  10 +-
 .../modules/ROOT/pages/content-enricher.adoc       |  60 ++--
 .../modules/ROOT/pages/correlation-identifier.adoc |   2 +-
 .../ROOT/pages/cronscheduledroutepolicy.adoc       |   8 +-
 .../modules/ROOT/pages/dead-letter-channel.adoc    |   8 +-
 .../modules/ROOT/pages/dozer-type-conversion.adoc  |   4 +-
 .../pages/enterprise-integration-patterns.adoc     |   2 +-
 .../modules/ROOT/pages/error-handler.adoc          |   2 -
 .../ROOT/pages/eventDrivenConsumer-eip.adoc        |   8 +-
 .../modules/ROOT/pages/exception-clause.adoc       | 110 ++++----
 .../user-manual/modules/ROOT/pages/expression.adoc |   2 +-
 .../pages/faq/how-do-i-configure-endpoints.adoc    |  12 +-
 ...ow-do-i-import-routes-from-other-xml-files.adoc |  12 +-
 ...kage-applications-using-camel-and-activemq.adoc |   2 +-
 .../pages/faq/how-to-use-a-dynamic-uri-in-to.adoc  |   4 +-
 .../modules/ROOT/pages/graceful-shutdown.adoc      |   4 +-
 .../modules/ROOT/pages/guaranteed-delivery.adoc    |   4 +-
 .../modules/ROOT/pages/http-session-handling.adoc  |   6 +-
 docs/user-manual/modules/ROOT/pages/index.adoc     |   1 -
 docs/user-manual/modules/ROOT/pages/java-dsl.adoc  |   3 +-
 docs/user-manual/modules/ROOT/pages/jmx.adoc       |  18 +-
 docs/user-manual/modules/ROOT/pages/json.adoc      |  48 ++--
 .../modules/ROOT/pages/message-channel.adoc        |   2 +-
 .../modules/ROOT/pages/oncompletion.adoc           |  14 +-
 .../ROOT/pages/parameter-binding-annotations.adoc  |  12 +-
 .../modules/ROOT/pages/point-to-point-channel.adoc |   2 +-
 .../modules/ROOT/pages/pojo-producing.adoc         |   8 +-
 .../modules/ROOT/pages/polling-consumer.adoc       |  36 +--
 .../modules/ROOT/pages/process-eip.adoc            |   3 +-
 .../modules/ROOT/pages/producertemplate.adoc       |   2 +-
 docs/user-manual/modules/ROOT/pages/rest-dsl.adoc  | 120 ++++----
 .../modules/ROOT/pages/rollback-eip.adoc           |  12 +-
 .../modules/ROOT/pages/route-policy.adoc           |  20 +-
 .../ROOT/pages/scala-dsl-getting-started.adoc      |   2 +-
 .../modules/ROOT/pages/scripting-languages.adoc    |   2 +-
 .../modules/ROOT/pages/simple-language.adoc        |   4 +-
 .../ROOT/pages/simplescheduledroutepolicy.adoc     |  24 +-
 .../modules/ROOT/pages/spring-remoting.adoc        |  46 +--
 .../modules/ROOT/pages/spring-testing.adoc         | 156 +++++------
 docs/user-manual/modules/ROOT/pages/spring.adoc    |  26 +-
 docs/user-manual/modules/ROOT/pages/support.adoc   |   6 +-
 docs/user-manual/modules/ROOT/pages/team.adoc      | 178 ++++++------
 docs/user-manual/modules/ROOT/pages/testing.adoc   |  20 +-
 .../modules/ROOT/pages/threading-model.adoc        |   2 +-
 docs/user-manual/modules/ROOT/pages/toD-eip.adoc   |  20 +-
 .../modules/ROOT/pages/tokenize-language.adoc      |   6 +-
 docs/user-manual/modules/ROOT/pages/tracer.adoc    |   2 +-
 .../modules/ROOT/pages/transactional-client.adoc   |  12 +-
 .../modules/ROOT/pages/type-converter.adoc         |   4 +-
 .../modules/ROOT/pages/user-stories.adoc           |   6 +-
 .../ROOT/pages/using-propertyplaceholder.adoc      |  98 +++----
 .../ROOT/pages/walk-through-another-example.adoc   |   4 +-
 .../ROOT/pages/what-are-the-dependencies.adoc      |   6 +-
 .../modules/ROOT/pages/wireTap-eip.adoc            |  12 +-
 .../modules/ROOT/pages/xml-reference.adoc          |   2 +-
 examples/camel-example-rest-swagger/pom.xml        |   2 +-
 .../README.adoc                                    |   2 +-
 examples/camel-example-telegram/README.adoc        |   4 +-
 examples/camel-example-telegram/pom.xml            |   6 +-
 .../apache/camel/example/telegram/Application.java |   3 +-
 .../example/telegram/TelegramRouteBuilder.java     |   4 +-
 parent/pom.xml                                     |   6 +-
 .../springboot/AtmosComponentConfiguration.java    |   2 +-
 .../springboot/cloud/ConsulServiceRegistryIT.java  |   2 +-
 .../jms/springboot/JmsComponentConfiguration.java  |  13 +
 .../PropertiesComponentConfiguration.java          |  14 +
 ...TwitterStreamingComponentAutoConfiguration.java | 129 ---------
 .../TwitterStreamingComponentConfiguration.java    | 164 -----------
 .../src/main/resources/META-INF/spring.factories   |   3 +-
 .../camel/itest/jms2/Jms2DeliveryDelayTest.java    |  58 ++--
 .../apache/camel/itest/karaf/CamelTwitterTest.java |   1 -
 .../camel/itest/springboot/CamelTwitterTest.java   |   1 -
 .../arquillian/ArquillianSyncBootJarLauncher.java  |   3 +-
 .../tools/apt/EndpointAnnotationProcessor.java     |   4 +-
 .../main/java/org/apache/camel/spi/UriPath.java    |   5 +
 653 files changed, 5403 insertions(+), 7911 deletions(-)
 delete mode 100644 components/camel-aws-xray/src/main/java/org/apache/camel/component/aws/xray/decorators/http/NettyHttp4SegmentDecorator.java
 delete mode 100644 components/camel-opentracing/src/main/java/org/apache/camel/opentracing/decorators/NettyHttp4SpanDecorator.java
 create mode 100644 components/camel-test-junit5/src/main/java/org/apache/camel/test/CamelRouteCoverageDumper.java
 delete mode 100644 components/camel-test-junit5/src/test/resources/jndi.properties
 delete mode 100644 components/camel-twitter/src/main/docs/twitter-streaming-component.adoc
 delete mode 100644 components/camel-twitter/src/main/docs/twitter.adoc
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/data/StreamingType.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/AbstractStreamingConsumerHandler.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/FilterStreamingConsumerHandler.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/SampleStreamingConsumerHandler.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingComponent.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/TwitterStreamingEndpoint.java
 delete mode 100644 components/camel-twitter/src/main/java/org/apache/camel/component/twitter/streaming/UserStreamingConsumerHandler.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/SearchEventTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/TwitterComponentVerifierExtensionTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/TwitterComponentVerifierTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/UserStreamingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/DirectMessageDirectTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/DirectMessagePollingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/HomeTimeLineDirectTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/HomeTimeLinePollingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/SearchByExchangeDirectTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/SearchDirectTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/SearchEventTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/SearchPollingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/UserProducerInOnlyTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/UserProducerInOutTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/UserStreamingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/UserTimeLineDirectTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/deprecated/UserTimeLinePollingTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/streaming/TwitterStreamingComponentVerifierExtensionTest.java
 delete mode 100644 components/camel-twitter/src/test/java/org/apache/camel/component/twitter/streaming/TwitterStreamingComponentVerifierTest.java
 create mode 100644 core/camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentPropertiesSourceTest.java
 copy core/camel-core/src/test/java/org/apache/camel/processor/{StreamCachingCustomShouldSpoolRuleTest.java => StreamCachingSpoolDirectoryQuarkusTest.java} (83%)
 delete mode 100644 core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/TwitterStreamingEndpointBuilderFactory.java
 delete mode 100644 docs/components/modules/ROOT/pages/twitter-streaming-component.adoc
 delete mode 100644 docs/components/modules/ROOT/pages/twitter.adoc
 delete mode 100644 platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/streaming/springboot/TwitterStreamingComponentAutoConfiguration.java
 delete mode 100644 platforms/spring-boot/components-starter/camel-twitter-starter/src/main/java/org/apache/camel/component/twitter/streaming/springboot/TwitterStreamingComponentConfiguration.java
 copy core/camel-core/src/test/java/org/apache/camel/processor/OnCompletionWhenTest.java => tests/camel-itest-jms2/src/test/java/org/apache/camel/itest/jms2/Jms2DeliveryDelayTest.java (51%)


[camel] 01/04: CAMEL-13826: Turned TestSupport into a utility class

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

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

commit 5c7e31802324b1fab6c5ae135a31f13d900b21dd
Author: aldettinger <al...@gmail.com>
AuthorDate: Thu Aug 8 20:36:35 2019 +0200

    CAMEL-13826: Turned TestSupport into a utility class
---
 .../apache/camel/test/junit5/CamelTestSupport.java |  53 +--
 .../org/apache/camel/test/junit5/TestSupport.java  | 444 ++++++++++-----------
 .../junit5/patterns/AdviceWithNotStartedTest.java  |   1 +
 .../test/junit5/patterns/DebugJUnit5Test.java      |   6 +-
 .../patterns/DebugNoLazyTypeConverterTest.java     |   6 +-
 .../camel/test/junit5/patterns/DebugTest.java      |   6 +-
 .../junit5/patterns/IsMockEndpointsFileTest.java   |   2 +
 .../RouteProcessorDumpRouteCoverageTest.java       |   1 +
 8 files changed, 265 insertions(+), 254 deletions(-)

diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
index ff5c85b..d324389 100644
--- a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
@@ -108,7 +108,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
  * with some routes along with a {@link org.apache.camel.ProducerTemplate} for
  * use in the test case Do <tt>not</tt> use this class for Spring Boot testing.
  */
-public abstract class CamelTestSupport extends TestSupport implements BeforeEachCallback, AfterAllCallback, BeforeTestExecutionCallback, AfterTestExecutionCallback {
+public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCallback, BeforeTestExecutionCallback, AfterTestExecutionCallback {
 
     /**
      * JVM system property which can be set to true to turn on dumping route
@@ -357,9 +357,9 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
 
     @BeforeEach
     public void setUp() throws Exception {
-        log.info("********************************************************************************");
-        log.info("Testing: " + currentTestName + "(" + getClass().getName() + ")");
-        log.info("********************************************************************************");
+        LOG.info("********************************************************************************");
+        LOG.info("Testing: " + currentTestName + "(" + getClass().getName() + ")");
+        LOG.info("********************************************************************************");
 
         if (isCreateCamelContextPerClass()) {
             INSTANCE.set(this);
@@ -421,7 +421,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
     }
 
     private void doSetUp() throws Exception {
-        log.debug("setUp test");
+        LOG.debug("setUp test");
         // jmx is enabled if we have configured to use it, or if dump route
         // coverage is enabled (it requires JMX)
         boolean jmx = useJmx() || isRouteCoverageEnabled();
@@ -445,7 +445,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         // set debugger if enabled
         if (isUseDebugger()) {
             if (context.getStatus().equals(ServiceStatus.Started)) {
-                log.info("Cannot setting the Debugger to the starting CamelContext, stop the CamelContext now.");
+                LOG.info("Cannot setting the Debugger to the starting CamelContext, stop the CamelContext now.");
                 // we need to stop the context first to setup the debugger
                 context.stop();
             }
@@ -492,7 +492,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         String include = getRouteFilterIncludePattern();
         String exclude = getRouteFilterExcludePattern();
         if (include != null || exclude != null) {
-            log.info("Route filtering pattern: include={}, exclude={}", include, exclude);
+            LOG.info("Route filtering pattern: include={}, exclude={}", include, exclude);
             context.getExtension(Model.class).setRouteFilterPattern(include, exclude);
         }
 
@@ -502,23 +502,23 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         if (isUseRouteBuilder()) {
             RoutesBuilder[] builders = createRouteBuilders();
             for (RoutesBuilder builder : builders) {
-                log.debug("Using created route builder: " + builder);
+                LOG.debug("Using created route builder: " + builder);
                 context.addRoutes(builder);
             }
             replaceFromEndpoints();
             boolean skip = "true".equalsIgnoreCase(System.getProperty("skipStartingCamelContext"));
             if (skip) {
-                log.info("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
+                LOG.info("Skipping starting CamelContext as system property skipStartingCamelContext is set to be true.");
             } else if (isUseAdviceWith()) {
-                log.info("Skipping starting CamelContext as isUseAdviceWith is set to true.");
+                LOG.info("Skipping starting CamelContext as isUseAdviceWith is set to true.");
             } else {
                 startCamelContext();
             }
         } else {
             replaceFromEndpoints();
-            log.debug("Using route builder from the created context: " + context);
+            LOG.debug("Using route builder from the created context: " + context);
         }
-        log.debug("Routing Rules are: " + context.getRoutes());
+        LOG.debug("Routing Rules are: " + context.getRoutes());
 
         assertValidContext(context);
     }
@@ -542,9 +542,9 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
     public void tearDown() throws Exception {
         long time = watch.taken();
 
-        log.info("********************************************************************************");
-        log.info("Testing done: " + currentTestName + "(" + getClass().getName() + ")");
-        log.info("Took: " + TimeUtils.printDuration(time) + " (" + time + " millis)");
+        LOG.info("********************************************************************************");
+        LOG.info("Testing done: " + currentTestName + "(" + getClass().getName() + ")");
+        LOG.info("Took: " + TimeUtils.printDuration(time) + " (" + time + " millis)");
 
         // if we should dump route stats, then write that to a file
         if (isRouteCoverageEnabled()) {
@@ -555,7 +555,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
             ManagedCamelContext mc = context != null ? context.getExtension(ManagedCamelContext.class) : null;
             ManagedCamelContextMBean managedCamelContext = mc != null ? mc.getManagedCamelContext() : null;
             if (managedCamelContext == null) {
-                log.warn("Cannot dump route coverage to file as JMX is not enabled. "
+                LOG.warn("Cannot dump route coverage to file as JMX is not enabled. "
                          + "Add camel-management-impl JAR as dependency and/or override useJmx() method to enable JMX in the unit test classes.");
             } else {
                 logCoverageSummary(managedCamelContext);
@@ -568,14 +568,14 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
                 file.mkdirs();
                 file = new File(dir, name);
 
-                log.info("Dumping route coverage to file: {}", file);
+                LOG.info("Dumping route coverage to file: {}", file);
                 InputStream is = new ByteArrayInputStream(combined.getBytes());
                 OutputStream os = new FileOutputStream(file, false);
                 IOHelper.copyAndCloseInput(is, os);
                 IOHelper.close(os);
             }
         }
-        log.info("********************************************************************************");
+        LOG.info("********************************************************************************");
 
         if (isCreateCamelContextPerClass()) {
             // will tear down test specially in CamelTearDownRule
@@ -677,7 +677,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         }
 
         builder.append(routesSummary);
-        log.info(builder.toString());
+        LOG.info(builder.toString());
     }
 
     /**
@@ -953,7 +953,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         // jndi.properties is optional
         InputStream in = getClass().getClassLoader().getResourceAsStream("jndi.properties");
         if (in != null) {
-            log.debug("Using jndi.properties from classpath root");
+            LOG.debug("Using jndi.properties from classpath root");
             properties.load(in);
         } else {
             properties.put("java.naming.factory.initial", "org.apache.camel.support.jndi.CamelInitialContextFactory");
@@ -1013,7 +1013,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
      * @return the endpoint
      */
     protected Endpoint resolveMandatoryEndpoint(String uri) {
-        return resolveMandatoryEndpoint(context, uri);
+        return TestSupport.resolveMandatoryEndpoint(context, uri);
     }
 
     /**
@@ -1025,7 +1025,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
      * @return the endpoint
      */
     protected <T extends Endpoint> T resolveMandatoryEndpoint(String uri, Class<T> endpointType) {
-        return resolveMandatoryEndpoint(context, uri, endpointType);
+        return TestSupport.resolveMandatoryEndpoint(context, uri, endpointType);
     }
 
     /**
@@ -1055,7 +1055,8 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
      * @throws NoSuchEndpointException is the mock endpoint does not exists
      */
     protected MockEndpoint getMockEndpoint(String uri, boolean create) throws NoSuchEndpointException {
-        // look for existing mock endpoints that have the same queue name, and to
+        // look for existing mock endpoints that have the same queue name, and
+        // to
         // do that we need to normalize uri and strip out query parameters and
         // whatnot
         String n;
@@ -1144,7 +1145,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
      * Creates an exchange with the given body
      */
     protected Exchange createExchangeWithBody(Object body) {
-        return createExchangeWithBody(context, body);
+        return TestSupport.createExchangeWithBody(context, body);
     }
 
     /**
@@ -1157,7 +1158,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         Expression expression = language.createExpression(expressionText);
         assertNotNull(expression, "No Expression could be created for text: " + expressionText + " language: " + language);
 
-        assertExpression(expression, exchange, expectedValue);
+        TestSupport.assertExpression(expression, exchange, expectedValue);
     }
 
     /**
@@ -1170,7 +1171,7 @@ public abstract class CamelTestSupport extends TestSupport implements BeforeEach
         Predicate predicate = language.createPredicate(expressionText);
         assertNotNull(predicate, "No Predicate could be created for text: " + expressionText + " language: " + language);
 
-        assertPredicate(predicate, exchange, expected);
+        TestSupport.assertPredicate(predicate, exchange, expected);
     }
 
     /**
diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java
index 47d296f..04b39b5 100644
--- a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java
@@ -44,33 +44,37 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
 /**
- * A bunch of useful testing methods
+ * Provides utility methods for camel test purpose (builders, assertions,
+ * endpoint resolutions, file helpers).
  */
-public abstract class TestSupport {
+public final class TestSupport {
 
-    protected static final String LS = System.lineSeparator();
     private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class);
-    protected Logger log = LoggerFactory.getLogger(getClass());
 
+    private TestSupport() {
+    }
+
+    // -------------------------------------------------------------------------
     // Builder methods for expressions used when testing
     // -------------------------------------------------------------------------
 
     /**
-     * Returns a value builder for the given header
+     * Returns a value builder for the given header.
      */
     public static ValueBuilder header(String name) {
         return Builder.header(name);
     }
 
     /**
-     * Returns a value builder for the given exchange property
+     * Returns a value builder for the given exchange property.
      */
     public static ValueBuilder exchangeProperty(String name) {
         return Builder.exchangeProperty(name);
     }
 
     /**
-     * Returns a predicate and value builder for the inbound body on an exchange
+     * Returns a predicate and value builder for the inbound body on an
+     * exchange.
      */
     public static ValueBuilder body() {
         return Builder.body();
@@ -78,134 +82,139 @@ public abstract class TestSupport {
 
     /**
      * Returns a predicate and value builder for the inbound message body as a
-     * specific type
+     * specific type.
      */
     public static <T> ValueBuilder bodyAs(Class<T> type) {
         return Builder.bodyAs(type);
     }
 
     /**
-     * Returns a value builder for the given system property
+     * Returns a value builder for the given system property.
      */
     public static ValueBuilder systemProperty(String name) {
         return Builder.systemProperty(name);
     }
 
     /**
-     * Returns a value builder for the given system property
+     * Returns a value builder for the given system property.
      */
     public static ValueBuilder systemProperty(String name, String defaultValue) {
         return Builder.systemProperty(name, defaultValue);
     }
 
+    // -----------------------------------------------------------------------
     // Assertions
     // -----------------------------------------------------------------------
 
+    /**
+     * Asserts that a given value is of an expected type.
+     */
     public static <T> T assertIsInstanceOf(Class<T> expectedType, Object value) {
         assertNotNull(value, "Expected an instance of type: " + expectedType.getName() + " but was null");
         assertTrue(expectedType.isInstance(value), "Object should be of type " + expectedType.getName() + " but was: " + value + " with the type: " + value.getClass().getName());
         return expectedType.cast(value);
     }
 
-    public static void assertEndpointUri(Endpoint endpoint, String uri) {
-        assertNotNull(endpoint, "Endpoint is null when expecting endpoint for: " + uri);
-        assertEquals(endpoint.getEndpointUri(), "Endpoint uri for: " + endpoint, uri);
+    /**
+     * Asserts that a given endpoint has an expected uri.
+     */
+    public static void assertEndpointUri(Endpoint endpoint, String expectedUri) {
+        assertNotNull(endpoint, "Endpoint is null when expecting endpoint for: " + expectedUri);
+        assertEquals(expectedUri, endpoint.getEndpointUri(), "Endpoint uri for: " + endpoint);
     }
 
     /**
-     * Asserts the In message on the exchange contains the expected value
+     * Asserts that the In message on the exchange contains an header with a
+     * given name and expected value.
      */
-    public static Object assertInMessageHeader(Exchange exchange, String name, Object expected) {
-        return assertMessageHeader(exchange.getIn(), name, expected);
+    public static Object assertInMessageHeader(Exchange exchange, String headerName, Object expectedValue) {
+        return assertMessageHeader(exchange.getIn(), headerName, expectedValue);
     }
 
     /**
-     * Asserts the Out message on the exchange contains the expected value
+     * Asserts that the message on the exchange contains an header with a given
+     * name and expected value.
      */
-    public static Object assertOutMessageHeader(Exchange exchange, String name, Object expected) {
-        return assertMessageHeader(exchange.getOut(), name, expected);
+    public static Object assertOutMessageHeader(Exchange exchange, String headerName, Object expectedValue) {
+        return assertMessageHeader(exchange.getMessage(), headerName, expectedValue);
     }
 
     /**
-     * Asserts that the given exchange has an OUT message of the given body
-     * value
-     *
-     * @param exchange the exchange which should have an OUT message
-     * @param expected the expected value of the OUT message
-     * @throws InvalidPayloadException is thrown if the payload is not the
-     *             expected class type
+     * Asserts that the given exchange has a given expectedBody on the IN
+     * message.
      */
-    public static void assertInMessageBodyEquals(Exchange exchange, Object expected) throws InvalidPayloadException {
-        assertNotNull(exchange, "Should have a response exchange!");
+    public static void assertInMessageBodyEquals(Exchange exchange, Object expectedBody) throws InvalidPayloadException {
+        assertNotNull(exchange, "Should have a response exchange");
 
-        Object actual;
-        if (expected == null) {
-            actual = exchange.getIn().getMandatoryBody();
-            assertEquals(expected, actual, "in body of: " + exchange);
+        Object actualBody;
+        if (expectedBody == null) {
+            actualBody = exchange.getIn().getMandatoryBody();
+            assertEquals(expectedBody, actualBody, "in body of: " + exchange);
         } else {
-            actual = exchange.getIn().getMandatoryBody(expected.getClass());
+            actualBody = exchange.getIn().getMandatoryBody(expectedBody.getClass());
         }
-        assertEquals(expected, actual, "in body of: " + exchange);
+        assertEquals(expectedBody, actualBody, "in body of: " + exchange);
 
         LOG.debug("Received response: " + exchange + " with in: " + exchange.getIn());
     }
 
     /**
-     * Asserts that the given exchange has an OUT message of the given body
-     * value
-     *
-     * @param exchange the exchange which should have an OUT message
-     * @param expected the expected value of the OUT message
-     * @throws InvalidPayloadException is thrown if the payload is not the
-     *             expected class type
+     * Asserts that the given exchange has a given expectedBody on the message.
      */
-    public static void assertOutMessageBodyEquals(Exchange exchange, Object expected) throws InvalidPayloadException {
+    public static void assertMessageBodyEquals(Exchange exchange, Object expectedBody) throws InvalidPayloadException {
         assertNotNull(exchange, "Should have a response exchange!");
 
-        Object actual;
-        if (expected == null) {
-            actual = exchange.getOut().getMandatoryBody();
-            assertEquals(expected, actual, "output body of: " + exchange);
+        Object actualBody;
+        if (expectedBody == null) {
+            actualBody = exchange.getMessage().getMandatoryBody();
+            assertEquals(expectedBody, actualBody, "output body of: " + exchange);
         } else {
-            actual = exchange.getOut().getMandatoryBody(expected.getClass());
+            actualBody = exchange.getMessage().getMandatoryBody(expectedBody.getClass());
         }
-        assertEquals(expected, actual, "output body of: " + exchange);
+        assertEquals(expectedBody, actualBody, "output body of: " + exchange);
 
-        LOG.debug("Received response: " + exchange + " with out: " + exchange.getOut());
+        LOG.debug("Received response: " + exchange + " with out: " + exchange.getMessage());
     }
 
-    public static Object assertMessageHeader(Message message, String name, Object expected) {
-        Object value = message.getHeader(name);
-        assertEquals(expected, value, "Header: " + name + " on Message: " + message);
-        return value;
+    /**
+     * Asserts that a given message contains an header with a given name and
+     * expected value.
+     */
+    public static Object assertMessageHeader(Message message, String headerName, Object expectedValue) {
+        Object actualValue = message.getHeader(headerName);
+        assertEquals(expectedValue, actualValue, "Header: " + headerName + " on Message: " + message);
+        return actualValue;
     }
 
     /**
-     * Asserts that the given expression when evaluated returns the given answer
+     * Asserts that the given expression when evaluated returns the given
+     * answer.
      */
-    public static Object assertExpression(Expression expression, Exchange exchange, Object expected) {
-        Object value;
-        if (expected != null) {
-            value = expression.evaluate(exchange, expected.getClass());
+    public static Object assertExpression(Expression expression, Exchange exchange, Object expectedAnswer) {
+        Object actualAnswer;
+        if (expectedAnswer != null) {
+            actualAnswer = expression.evaluate(exchange, expectedAnswer.getClass());
         } else {
-            value = expression.evaluate(exchange, Object.class);
+            actualAnswer = expression.evaluate(exchange, Object.class);
         }
 
-        LOG.debug("Evaluated expression: " + expression + " on exchange: " + exchange + " result: " + value);
+        LOG.debug("Evaluated expression: " + expression + " on exchange: " + exchange + " result: " + actualAnswer);
 
-        assertEquals(expected, value, "Expression: " + expression + " on Exchange: " + exchange);
-        return value;
+        assertEquals(expectedAnswer, actualAnswer, "Expression: " + expression + " on Exchange: " + exchange);
+        return actualAnswer;
     }
 
     /**
-     * Asserts that the predicate returns the expected value on the exchange
+     * Asserts that a given predicate returns <code>true</code> on a given
+     * exchange.
      */
     public static void assertPredicateMatches(Predicate predicate, Exchange exchange) {
         assertPredicate(predicate, exchange, true);
     }
 
     /**
-     * Asserts that the predicate returns the expected value on the exchange
+     * Asserts that a given predicate returns <code>false</code> on a given
+     * exchange.
      */
     public static void assertPredicateDoesNotMatch(Predicate predicate, Exchange exchange) {
         try {
@@ -217,91 +226,163 @@ public abstract class TestSupport {
     }
 
     /**
-     * Asserts that the predicate returns the expected value on the exchange
+     * Asserts that the predicate returns the expected value on the exchange.
      */
-    public static boolean assertPredicate(final Predicate predicate, Exchange exchange, boolean expected) {
-        if (expected) {
+    public static boolean assertPredicate(final Predicate predicate, Exchange exchange, boolean expectedValue) {
+        if (expectedValue) {
             PredicateAssertHelper.assertMatches(predicate, "Predicate failed: ", exchange);
         }
-        boolean value = predicate.matches(exchange);
+        boolean actualValue = predicate.matches(exchange);
 
-        LOG.debug("Evaluated predicate: " + predicate + " on exchange: " + exchange + " result: " + value);
+        LOG.debug("Evaluated predicate: " + predicate + " on exchange: " + exchange + " result: " + actualValue);
 
-        assertEquals(expected, value, "Predicate: " + predicate + " on Exchange: " + exchange);
-        return value;
+        assertEquals(expectedValue, actualValue, "Predicate: " + predicate + " on Exchange: " + exchange);
+        return actualValue;
     }
 
     /**
-     * Resolves an endpoint and asserts that it is found
+     * Asserts that a given list has a single element.
      */
-    public static Endpoint resolveMandatoryEndpoint(CamelContext context, String uri) {
-        Endpoint endpoint = context.getEndpoint(uri);
+    public static <T> T assertOneElement(List<T> list) {
+        assertEquals(1, list.size(), "Size of list should be 1: " + list);
+        return list.get(0);
+    }
 
-        assertNotNull(endpoint, "No endpoint found for URI: " + uri);
+    /**
+     * Asserts that a given list has a given expected size.
+     */
+    public static <T> List<T> assertListSize(List<T> list, int expectedSize) {
+        return assertListSize("List", list, expectedSize);
+    }
 
-        return endpoint;
+    /**
+     * Asserts that a list is of the given size. When the assertion is broken,
+     * the error message starts with a given prefix.
+     */
+    public static <T> List<T> assertListSize(String brokenAssertionMessagePrefix, List<T> list, int expectedSize) {
+        assertEquals(expectedSize, list.size(), brokenAssertionMessagePrefix + " should be of size: " + expectedSize + " but is: " + list);
+        return list;
     }
 
     /**
-     * Resolves an endpoint and asserts that it is found
+     * Asserts that a given collection has a given size.
      */
-    public static <T extends Endpoint> T resolveMandatoryEndpoint(CamelContext context, String uri, Class<T> endpointType) {
-        T endpoint = context.getEndpoint(uri, endpointType);
+    public static <T> Collection<T> assertCollectionSize(Collection<T> list, int expectedSize) {
+        return assertCollectionSize("List", list, expectedSize);
+    }
 
-        assertNotNull(endpoint, "No endpoint found for URI: " + uri);
+    /**
+     * Asserts that a given collection has a given size. When the assertion is
+     * broken, the error message starts with a given prefix.
+     */
+    public static <T> Collection<T> assertCollectionSize(String brokenAssertionMessagePrefix, Collection<T> list, int expectedSize) {
+        assertEquals(expectedSize, list.size(), brokenAssertionMessagePrefix + " should be of size: " + expectedSize + " but is: " + list);
+        return list;
+    }
 
-        return endpoint;
+    /**
+     * Asserts that the text contains the given string.
+     *
+     * @param text the text to compare
+     * @param containedText the text which must be contained inside the other
+     *            text parameter
+     */
+    public static void assertStringContains(String text, String containedText) {
+        assertNotNull(text, "Text should not be null!");
+        assertTrue(text.contains(containedText), "Text: " + text + " does not contain: " + containedText);
     }
 
     /**
-     * Creates an exchange with the given body
+     * Asserts that two given directories are equal. To be used for
+     * folder/directory comparison that works across different platforms such as
+     * Window, Mac and Linux.
      */
-    protected Exchange createExchangeWithBody(CamelContext camelContext, Object body) {
-        Exchange exchange = new DefaultExchange(camelContext);
-        Message message = exchange.getIn();
-        message.setHeader("testClass", getClass().getName());
-        message.setBody(body);
-        return exchange;
+    public static void assertDirectoryEquals(String expected, String actual) {
+        assertDirectoryEquals(null, expected, actual);
     }
 
-    public static <T> T assertOneElement(List<T> list) {
-        assertEquals(1, list.size(), "Size of list should be 1: " + list);
-        return list.get(0);
+    /**
+     * Asserts that two given directories are equal. To be used for
+     * folder/directory comparison that works across different platforms such as
+     * Window, Mac and Linux.
+     */
+    public static void assertDirectoryEquals(String message, String expected, String actual) {
+        // must use single / as path separators
+        String expectedPath = expected.replace('\\', '/');
+        String actualPath = actual.replace('\\', '/');
+
+        if (message != null) {
+            assertEquals(message, expectedPath, actualPath);
+        } else {
+            assertEquals(expectedPath, actualPath);
+        }
     }
 
     /**
-     * Asserts that a list is of the given size
+     * Asserts that a given directory is found in the file system.
      */
-    public static <T> List<T> assertListSize(List<T> list, int size) {
-        return assertListSize("List", list, size);
+    public static void assertDirectoryExists(String filename) {
+        File file = new File(filename);
+        assertTrue(file.exists(), "Directory " + filename + " should exist");
+        assertTrue(file.isDirectory(), "Directory " + filename + " should be a directory");
     }
 
     /**
-     * Asserts that a list is of the given size
+     * Asserts that a given file is found in the file system.
      */
-    public static <T> List<T> assertListSize(String message, List<T> list, int size) {
-        assertEquals(size, list.size(), message + " should be of size: " + size + " but is: " + list);
-        return list;
+    public static void assertFileExists(String filename) {
+        File file = new File(filename);
+        assertTrue(file.exists(), "File " + filename + " should exist");
+        assertTrue(file.isFile(), "File " + filename + " should be a file");
     }
 
     /**
-     * Asserts that a list is of the given size
+     * Asserts that a given file is <b>not</b> found in the file system.
      */
-    public static <T> Collection<T> assertCollectionSize(Collection<T> list, int size) {
-        return assertCollectionSize("List", list, size);
+    public static void assertFileNotExists(String filename) {
+        File file = new File(filename);
+        assertFalse(file.exists(), "File " + filename + " should not exist");
     }
 
+    // -----------------------------------------------------------------------
+    // Other helpers, resolution, file, getRouteList
+    // -----------------------------------------------------------------------
+
     /**
-     * Asserts that a list is of the given size
+     * Resolves an endpoint and asserts that it is found.
      */
-    public static <T> Collection<T> assertCollectionSize(String message, Collection<T> list, int size) {
-        assertEquals(size, list.size(), message + " should be of size: " + size + " but is: " + list);
-        return list;
+    public static Endpoint resolveMandatoryEndpoint(CamelContext context, String endpointUri) {
+        Endpoint endpoint = context.getEndpoint(endpointUri);
+
+        assertNotNull(endpoint, "No endpoint found for URI: " + endpointUri);
+
+        return endpoint;
+    }
+
+    /**
+     * Resolves an endpoint and asserts that it is found.
+     */
+    public static <T extends Endpoint> T resolveMandatoryEndpoint(CamelContext context, String endpointUri, Class<T> endpointType) {
+        T endpoint = context.getEndpoint(endpointUri, endpointType);
+
+        assertNotNull(endpoint, "No endpoint found for URI: " + endpointUri);
+
+        return endpoint;
+    }
+
+    /**
+     * Creates an exchange with the given body.
+     */
+    public static Exchange createExchangeWithBody(CamelContext camelContext, Object body) {
+        Exchange exchange = new DefaultExchange(camelContext);
+        Message message = exchange.getIn();
+        message.setBody(body);
+        return exchange;
     }
 
     /**
      * A helper method to create a list of Route objects for a given route
-     * builder
+     * builder.
      */
     public static List<Route> getRouteList(RouteBuilder builder) throws Exception {
         CamelContext context = new DefaultCamelContext();
@@ -313,32 +394,22 @@ public abstract class TestSupport {
     }
 
     /**
-     * Asserts that the text contains the given string
-     *
-     * @param text the text to compare
-     * @param containedText the text which must be contained inside the other
-     *            text parameter
-     */
-    public static void assertStringContains(String text, String containedText) {
-        assertNotNull(text, "Text should not be null!");
-        assertTrue(text.contains(containedText), "Text: " + text + " does not contain: " + containedText);
-    }
-
-    /**
-     * Recursively delete a directory, useful to zapping test data
+     * Recursively delete a directory, useful to zapping test data. Deletion
+     * will be attempted up to five time before giving up.
      *
      * @param file the directory to be deleted
-     * @return <tt>false</tt> if error deleting directory
+     * @return <tt>false</tt> when an error occur while deleting directory
      */
     public static boolean deleteDirectory(String file) {
         return deleteDirectory(new File(file));
     }
 
     /**
-     * Recursively delete a directory, useful to zapping test data
+     * Recursively delete a directory, useful to zapping test data. Deletion
+     * will be attempted up to five time before giving up.
      *
      * @param file the directory to be deleted
-     * @return <tt>false</tt> if error deleting directory
+     * @return <tt>false</tt> when an error occur while deleting directory
      */
     public static boolean deleteDirectory(File file) {
         int tries = 0;
@@ -359,7 +430,13 @@ public abstract class TestSupport {
         return !exists;
     }
 
-    private static void recursivelyDeleteDirectory(File file) {
+    /**
+     * Recursively delete a directory. Deletion will be attempted a single time
+     * before giving up.
+     *
+     * @param file the directory to be deleted
+     */
+    public static void recursivelyDeleteDirectory(File file) {
         if (!file.exists()) {
             return;
         }
@@ -377,7 +454,7 @@ public abstract class TestSupport {
     }
 
     /**
-     * create the directory
+     * Creates a given directory.
      *
      * @param file the directory to be created
      */
@@ -387,122 +464,39 @@ public abstract class TestSupport {
     }
 
     /**
-     * To be used for folder/directory comparison that works across different
-     * platforms such as Window, Mac and Linux.
-     */
-    public static void assertDirectoryEquals(String expected, String actual) {
-        assertDirectoryEquals(null, expected, actual);
-    }
-
-    /**
-     * To be used for folder/directory comparison that works across different
-     * platforms such as Window, Mac and Linux.
-     */
-    public static void assertDirectoryEquals(String message, String expected, String actual) {
-        // must use single / as path separators
-        String expectedPath = expected.replace('\\', '/');
-        String actualPath = actual.replace('\\', '/');
-
-        if (message != null) {
-            assertEquals(message, expectedPath, actualPath);
-        } else {
-            assertEquals(expectedPath, actualPath);
-        }
-    }
-
-    /**
-     * To be used to check is a directory is found in the file system
-     */
-    public static void assertDirectoryExists(String filename) {
-        File file = new File(filename);
-        assertTrue(file.exists(), "Directory " + filename + " should exist");
-        assertTrue(file.isDirectory(), "Directory " + filename + " should be a directory");
-    }
-
-    /**
-     * To be used to check is a file is found in the file system
-     */
-    public static void assertFileExists(String filename) {
-        File file = new File(filename);
-        assertTrue(file.exists(), "File " + filename + " should exist");
-        assertTrue(file.isFile(), "File " + filename + " should be a file");
-    }
-
-    /**
-     * To be used to check is a file is <b>not</b> found in the file system
-     */
-    public static void assertFileNotExists(String filename) {
-        File file = new File(filename);
-        assertFalse(file.exists(), "File " + filename + " should not exist");
-    }
-
-    /**
-     * Is this OS the given platform.
+     * Tells whether the current Operating System is the given expected
+     * platform.
      * <p/>
-     * Uses <tt>os.name</tt> from the system properties to determine the OS.
+     * Uses <tt>os.name</tt> from the system properties to determine the
+     * Operating System.
      *
-     * @param platform such as Windows
-     * @return <tt>true</tt> if its that platform.
+     * @param expectedPlatform such as Windows
+     * @return <tt>true</tt> when the current Operating System is the expected
+     *         platform, <tt>false</tt> otherwise.
      */
-    public static boolean isPlatform(String platform) {
+    public static boolean isPlatform(String expectedPlatform) {
         String osName = System.getProperty("os.name").toLowerCase(Locale.US);
-        return osName.contains(platform.toLowerCase(Locale.US));
+        return osName.contains(expectedPlatform.toLowerCase(Locale.US));
     }
 
     /**
-     * Is this Java by the given vendor.
+     * Tells whether the current Java Virtual Machine has been issued by a given
+     * expected vendor.
      * <p/>
      * Uses <tt>java.vendor</tt> from the system properties to determine the
      * vendor.
      *
-     * @param vendor such as IBM
-     * @return <tt>true</tt> if its that vendor.
+     * @param expectedVendor such as IBM
+     * @return <tt>true</tt> when the current Java Virtual Machine has been
+     *         issued by the expected vendor, <tt>false</tt> otherwise.
      */
-    public static boolean isJavaVendor(String vendor) {
+    public static boolean isJavaVendor(String expectedVendor) {
         String javaVendor = System.getProperty("java.vendor").toLowerCase(Locale.US);
-        return javaVendor.contains(vendor.toLowerCase(Locale.US));
-    }
-
-    /**
-     * Is this Java 1.5
-     *
-     * @return <tt>true</tt> if its Java 1.5, <tt>false</tt> if its not (for
-     *         example Java 1.6 or better)
-     * @deprecated will be removed in the future as Camel requires JDK1.8+
-     */
-    @Deprecated
-    public static boolean isJava15() {
-        return getJavaMajorVersion() == 5;
-    }
-
-    /**
-     * Is this Java 1.6
-     *
-     * @return <tt>true</tt> if its Java 1.6, <tt>false</tt> if its not (for
-     *         example Java 1.7 or better)
-     * @deprecated will be removed in the future as Camel requires JDK1.8+
-     */
-    @Deprecated
-    public static boolean isJava16() {
-        return getJavaMajorVersion() == 6;
-
-    }
-
-    /**
-     * Is this Java 1.7
-     *
-     * @return <tt>true</tt> if its Java 1.7, <tt>false</tt> if its not (for
-     *         example Java 1.6 or older)
-     * @deprecated will be removed in the future as Camel requires JDK1.8+
-     */
-    @Deprecated
-    public static boolean isJava17() {
-        return getJavaMajorVersion() == 7;
-
+        return javaVendor.contains(expectedVendor.toLowerCase(Locale.US));
     }
 
     /**
-     * Is this Java 1.8
+     * Tells whether the current Java version is 1.8.
      *
      * @return <tt>true</tt> if its Java 1.8, <tt>false</tt> if its not (for
      *         example Java 1.7 or older)
@@ -513,7 +507,7 @@ public abstract class TestSupport {
     }
 
     /**
-     * Is this Java 1.9
+     * Tells whether the current Java version is 1.9.
      *
      * @return <tt>true</tt> if its Java 1.9, <tt>false</tt> if its not (for
      *         example Java 1.8 or older)
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/AdviceWithNotStartedTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/AdviceWithNotStartedTest.java
index 68aae9c..b097165 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/AdviceWithNotStartedTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/AdviceWithNotStartedTest.java
@@ -26,6 +26,7 @@ import org.apache.camel.reifier.RouteReifier;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
 
+import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class AdviceWithNotStartedTest extends CamelTestSupport {
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugJUnit5Test.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugJUnit5Test.java
index 9a6811b..183d1d7 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugJUnit5Test.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugJUnit5Test.java
@@ -22,9 +22,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DebugJUnit5Test extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(DebugJUnit5Test.class);
+
     // START SNIPPET: e1
     @Override
     public boolean isUseDebugger() {
@@ -38,7 +42,7 @@ public class DebugJUnit5Test extends CamelTestSupport {
         // processor
         // from your Java editor you can just add a breakpoint in the code line
         // below
-        log.info("Before " + definition + " with body " + exchange.getIn().getBody());
+        LOG.info("Before " + definition + " with body " + exchange.getIn().getBody());
     }
     // END SNIPPET: e1
 
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
index 7584f15..a9cb78f 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
@@ -22,9 +22,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DebugNoLazyTypeConverterTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(DebugNoLazyTypeConverterTest.class);
+
     @Override
     protected boolean isLazyLoadingTypeConverter() {
         return false;
@@ -43,7 +47,7 @@ public class DebugNoLazyTypeConverterTest extends CamelTestSupport {
         // processor
         // from your Java editor you can just add a breakpoint in the code line
         // below
-        log.info("Before " + definition + " with body " + exchange.getIn().getBody());
+        LOG.info("Before " + definition + " with body " + exchange.getIn().getBody());
     }
     // END SNIPPET: e1
 
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugTest.java
index 38f75d5..87ae779 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugTest.java
@@ -22,9 +22,13 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.model.ProcessorDefinition;
 import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 public class DebugTest extends CamelTestSupport {
 
+    private static final Logger LOG = LoggerFactory.getLogger(DebugTest.class);
+
     // START SNIPPET: e1
     @Override
     public boolean isUseDebugger() {
@@ -38,7 +42,7 @@ public class DebugTest extends CamelTestSupport {
         // processor
         // from your Java editor you can just add a breakpoint in the code line
         // below
-        log.info("Before " + definition + " with body " + exchange.getIn().getBody());
+        LOG.info("Before " + definition + " with body " + exchange.getIn().getBody());
     }
     // END SNIPPET: e1
 
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/IsMockEndpointsFileTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/IsMockEndpointsFileTest.java
index 1407f13..fe621af 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/IsMockEndpointsFileTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/IsMockEndpointsFileTest.java
@@ -23,6 +23,8 @@ 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 IsMockEndpointsFileTest extends CamelTestSupport {
 
     @Override
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
index fe820dd..b97959c 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.test.junit5.CamelTestSupport;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.Test;
 
+import static org.apache.camel.test.junit5.TestSupport.assertFileExists;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class RouteProcessorDumpRouteCoverageTest extends CamelTestSupport {


[camel] 04/04: CAMEL-13826: rough migration of the camel-ahc component. To be polished, squashed and rebased

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

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

commit 603665bf632bdb5ed11a23ed89123c0e2ac9ec50
Author: aldettinger <al...@gmail.com>
AuthorDate: Mon Aug 12 19:23:58 2019 +0200

    CAMEL-13826: rough migration of the camel-ahc component. To be polished, squashed and rebased
---
 components/camel-ahc/pom.xml                       |   7 +-
 .../ahc/AhcBridgeEndpointPathWithSpacesTest.java   |   6 +-
 .../camel/component/ahc/AhcBridgeEndpointTest.java |  12 +-
 .../component/ahc/AhcClientConfigRealmUriTest.java |   4 +-
 .../component/ahc/AhcClientConfigUriTest.java      |   4 +-
 .../ahc/AhcComponentClientConfigTest.java          |   2 +-
 ...entConfigWithClientConfigUriParametersTest.java |   5 +-
 .../ahc/AhcComponentCustomClientConfigTest.java    |   2 +-
 .../ahc/AhcComponentNettyClientConfigTest.java     |   2 +-
 .../apache/camel/component/ahc/AhcGoogleTest.java  |   8 +-
 .../ahc/AhcOperationFailedExceptionTest.java       |   4 +-
 .../camel/component/ahc/AhcProduce500Test.java     |   9 +-
 .../component/ahc/AhcProduceClientConfigTest.java  |   2 +-
 ...entConfigWithClientConfigUriParametersTest.java |   5 +-
 .../component/ahc/AhcProduceGetHeadersTest.java    |   2 +-
 .../ahc/AhcProduceGetNoSlashInUriTest.java         |   2 +-
 .../camel/component/ahc/AhcProduceGetTest.java     |   4 +-
 .../AhcProduceNoThrowExceptionOnFailureTest.java   |   2 +-
 .../component/ahc/AhcProducePostDoWhileTest.java   |   2 +-
 .../component/ahc/AhcProducePostHeadersTest.java   |   2 +-
 .../camel/component/ahc/AhcProducePostTest.java    |   4 +-
 .../ahc/AhcProduceTransferExceptionTest.java       |   9 +-
 ...hcProduceWithClientConfigUriParametersTest.java |   2 +-
 .../ahc/AhcProducerConnectionCloseHeadersTest.java |   2 +-
 .../component/ahc/AhcProducerSessionTest.java      |   2 +-
 .../AhcProducerTwoParametersWithSameKeyTest.java   |  10 +-
 .../apache/camel/component/ahc/BaseAhcTest.java    |   6 +-
 .../camel/component/ahc/HttpEndpointURLTest.java   |   6 +-
 .../ahc/HttpHeaderFilterStrategyTest.java          |  11 +-
 .../ahc/javabody/AhcProduceJavaBodyTest.java       |   8 +-
 .../src/main/docs/test-junit5.adoc                 |  27 +++
 .../camel/test/CamelRouteCoverageDumper.java       | 190 +++++++++++++++++++++
 32 files changed, 312 insertions(+), 51 deletions(-)

diff --git a/components/camel-ahc/pom.xml b/components/camel-ahc/pom.xml
index 8395944..18d4d9b 100644
--- a/components/camel-ahc/pom.xml
+++ b/components/camel-ahc/pom.xml
@@ -65,7 +65,7 @@
         <!-- testing -->
         <dependency>
             <groupId>org.apache.camel</groupId>
-            <artifactId>camel-test</artifactId>
+            <artifactId>camel-test-junit5</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
@@ -78,10 +78,9 @@
             <artifactId>camel-jetty</artifactId>
             <scope>test</scope>
         </dependency>
-
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>java-hamcrest</artifactId>
             <scope>test</scope>
         </dependency>
         <dependency>
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
index a71ddf6..ac4bcde 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointPathWithSpacesTest.java
@@ -21,7 +21,9 @@ import java.io.ByteArrayInputStream;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcBridgeEndpointPathWithSpacesTest extends BaseAhcTest {
 
@@ -32,7 +34,7 @@ public class AhcBridgeEndpointPathWithSpacesTest extends BaseAhcTest {
     public void testBridgeEndpoint() throws Exception {
         String response = template.requestBodyAndHeader("http://localhost:" + port1 + "/test bar/hello",
                 new ByteArrayInputStream("This is a test".getBytes()), "Content-Type", "application/xml", String.class);
-        assertEquals("Get a wrong response", "/proxy%20bar/hello", response);
+        assertEquals("/proxy%20bar/hello", response, "Get a wrong response");
     }
 
     @Override
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
index 920d0ae..0a15b63 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcBridgeEndpointTest.java
@@ -22,7 +22,11 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 public class AhcBridgeEndpointTest extends BaseAhcTest {
 
@@ -33,16 +37,16 @@ public class AhcBridgeEndpointTest extends BaseAhcTest {
     public void testBridgeEndpoint() throws Exception {
         String response = template.requestBodyAndHeader("http://localhost:" + port1 + "/test/hello",
                 new ByteArrayInputStream("This is a test".getBytes()), "Content-Type", "application/xml", String.class);
-        assertEquals("Get a wrong response", "/", response);
+        assertEquals("/", response, "Get a wrong response");
 
         response = template.requestBody("http://localhost:" + port2 + "/hello/world", "hello", String.class);
-        assertEquals("Get a wrong response", "/hello/world", response);
+        assertEquals("/hello/world", response, "Get a wrong response");
 
         try {
             template.requestBody("http://localhost:" + port1 + "/hello/world", "hello", String.class);
             fail("Expect exception here!");
         } catch (Exception ex) {
-            assertTrue("We should get a RuntimeCamelException", ex instanceof RuntimeCamelException);
+            assertTrue(ex instanceof RuntimeCamelException, "We should get a RuntimeCamelException");
         }
     }
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
index 0f44664..dce95e0 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigRealmUriTest.java
@@ -17,7 +17,9 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcClientConfigRealmUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
index 835acee..9b29667 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcClientConfigUriTest.java
@@ -17,7 +17,9 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcClientConfigUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
index 35a3311..6664ada 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
index 2e827b7..50c7b4d 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentClientConfigWithClientConfigUriParametersTest.java
@@ -17,7 +17,10 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.Endpoint;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class AhcComponentClientConfigWithClientConfigUriParametersTest extends AhcComponentClientConfigTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
index 7e1d518..3ebba9f 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentCustomClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentCustomClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
index 94c0681..33f370a 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcComponentNettyClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcComponentNettyClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
index 3c71f5b..f7cb93c 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcGoogleTest.java
@@ -17,14 +17,14 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
 
 /**
  * Requires online internet connection for testing.
  */
-@Ignore("Run this test manual as it requires online internet")
+@Disabled("Run this test manual as it requires online internet")
 public class AhcGoogleTest extends CamelTestSupport {
 
     @Test
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
index 0ad335d..5a58d41 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcOperationFailedExceptionTest.java
@@ -16,11 +16,11 @@
  */
 package org.apache.camel.component.ahc;
 
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsNot.not;
 import static org.hamcrest.core.StringContains.containsString;
-import static org.junit.Assert.assertThat;
 
 public class AhcOperationFailedExceptionTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
index 1843822..44e56aa 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduce500Test.java
@@ -20,7 +20,12 @@ import org.apache.camel.CamelExecutionException;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.apache.camel.test.junit5.TestSupport;
+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.fail;
 
 public class AhcProduce500Test extends BaseAhcTest {
 
@@ -32,7 +37,7 @@ public class AhcProduce500Test extends BaseAhcTest {
             template.sendBody("direct:start", null);
             fail("Should have thrown exception");
         } catch (CamelExecutionException e) {
-            AhcOperationFailedException cause = assertIsInstanceOf(AhcOperationFailedException.class, e.getCause());
+            AhcOperationFailedException cause = TestSupport.assertIsInstanceOf(AhcOperationFailedException.class, e.getCause());
             assertNotNull(cause);
             assertEquals(500, cause.getStatusCode());
             assertEquals("Server Error", cause.getStatusText());
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
index 0416a7d..b30a684 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigTest.java
@@ -21,7 +21,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceClientConfigTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
index 0b023d7..9058c8d 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceClientConfigWithClientConfigUriParametersTest.java
@@ -17,7 +17,10 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.Endpoint;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class AhcProduceClientConfigWithClientConfigUriParametersTest extends AhcProduceClientConfigTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
index f053f45..72029d3 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceGetHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
index 682b8f6..bcee6b4 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetNoSlashInUriTest.java
@@ -17,7 +17,7 @@
 package org.apache.camel.component.ahc;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceGetNoSlashInUriTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
index 1e53506..0075202 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceGetTest.java
@@ -18,7 +18,9 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcProduceGetTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
index 99c1bca..ce6aaa8 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceNoThrowExceptionOnFailureTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceNoThrowExceptionOnFailureTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
index a32275f..87d8307 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostDoWhileTest.java
@@ -18,7 +18,7 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducePostDoWhileTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
index 40fff12..734fb50 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducePostHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
index d34f645..d2767e5 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducePostTest.java
@@ -18,7 +18,9 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class AhcProducePostTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
index 4e2076b..10c5bf4 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceTransferExceptionTest.java
@@ -18,7 +18,12 @@ package org.apache.camel.component.ahc;
 
 import org.apache.camel.CamelExecutionException;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.apache.camel.test.junit5.TestSupport;
+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.fail;
 
 public class AhcProduceTransferExceptionTest extends BaseAhcTest {
 
@@ -30,7 +35,7 @@ public class AhcProduceTransferExceptionTest extends BaseAhcTest {
             template.sendBody("direct:start", null);
             fail("Should have thrown exception");
         } catch (CamelExecutionException e) {
-            MyOrderException cause = assertIsInstanceOf(MyOrderException.class, e.getCause());
+            MyOrderException cause = TestSupport.assertIsInstanceOf(MyOrderException.class, e.getCause());
             assertNotNull(cause);
             assertEquals("123", cause.getOrderId());
         }
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
index da1ba0a..fed7ab3 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProduceWithClientConfigUriParametersTest.java
@@ -19,7 +19,7 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProduceWithClientConfigUriParametersTest extends BaseAhcTest {
     @Test
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
index 34ade6e..cc37cee 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerConnectionCloseHeadersTest.java
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.camel.Exchange;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducerConnectionCloseHeadersTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
index 1707957..d39becb 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerSessionTest.java
@@ -28,7 +28,7 @@ import org.apache.camel.http.common.cookie.ExchangeCookieHandler;
 import org.apache.camel.http.common.cookie.InstanceCookieHandler;
 import org.asynchttpclient.AsyncHttpClientConfig;
 import org.asynchttpclient.DefaultAsyncHttpClientConfig;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 
 public class AhcProducerSessionTest extends BaseAhcTest {
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
index d3edca1..a4e891b 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/AhcProducerTwoParametersWithSameKeyTest.java
@@ -22,7 +22,11 @@ import java.util.List;
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.builder.RouteBuilder;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 /**
  *
@@ -34,7 +38,7 @@ public class AhcProducerTwoParametersWithSameKeyTest extends BaseAhcTest {
         Exchange out = template.request("ahc:http://localhost:{{port}}/myapp?from=me&to=foo&to=bar", null);
 
         assertNotNull(out);
-        assertFalse("Should not fail", out.isFailed());
+        assertFalse(out.isFailed(), "Should not fail");
         assertEquals("OK", out.getOut().getBody(String.class));
         assertEquals("yes", out.getOut().getHeader("bar"));
     }
@@ -53,7 +57,7 @@ public class AhcProducerTwoParametersWithSameKeyTest extends BaseAhcTest {
         });
 
         assertNotNull(out);
-        assertFalse("Should not fail", out.isFailed());
+        assertFalse(out.isFailed(), "Should not fail");
         assertEquals("OK", out.getOut().getBody(String.class));
         assertEquals("yes", out.getOut().getHeader("bar"));
 
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
index 791d620..54d7b74 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/BaseAhcTest.java
@@ -27,8 +27,8 @@ import org.apache.camel.support.jsse.SSLContextParameters;
 import org.apache.camel.support.jsse.SSLContextServerParameters;
 import org.apache.camel.support.jsse.TrustManagersParameters;
 import org.apache.camel.test.AvailablePortFinder;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.BeforeClass;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeAll;
 
 public abstract class BaseAhcTest extends CamelTestSupport {
 
@@ -36,7 +36,7 @@ public abstract class BaseAhcTest extends CamelTestSupport {
 
     private static volatile int port;
 
-    @BeforeClass
+    @BeforeAll
     public static void initPort() throws Exception {
         port = AvailablePortFinder.getNextAvailable(24000);
     }
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
index 108e281..dcea426 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpEndpointURLTest.java
@@ -16,8 +16,10 @@
  */
 package org.apache.camel.component.ahc;
 
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
 
 public class HttpEndpointURLTest extends CamelTestSupport {
     
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
index 6b198c3..8447415 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/HttpHeaderFilterStrategyTest.java
@@ -19,9 +19,12 @@ package org.apache.camel.component.ahc;
 import org.apache.camel.Exchange;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.support.DefaultExchange;
-import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Before;
-import org.junit.Test;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class HttpHeaderFilterStrategyTest extends CamelTestSupport {
 
@@ -29,7 +32,7 @@ public class HttpHeaderFilterStrategyTest extends CamelTestSupport {
     private Exchange exchange;
 
     @Override
-    @Before
+    @BeforeEach
     public void setUp() {
         filter = new HttpHeaderFilterStrategy();
         exchange = new DefaultExchange(new DefaultCamelContext());
diff --git a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
index 4f3804a..77bc296 100644
--- a/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
+++ b/components/camel-ahc/src/test/java/org/apache/camel/component/ahc/javabody/AhcProduceJavaBodyTest.java
@@ -24,7 +24,13 @@ import org.apache.camel.component.ahc.AhcConstants;
 import org.apache.camel.component.ahc.BaseAhcTest;
 import org.apache.camel.component.jetty.JettyHttpComponent;
 import org.apache.camel.http.common.HttpCommonComponent;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
 
 /**
  *
diff --git a/components/camel-test-junit5/src/main/docs/test-junit5.adoc b/components/camel-test-junit5/src/main/docs/test-junit5.adoc
index 6624d90..778fc83 100644
--- a/components/camel-test-junit5/src/main/docs/test-junit5.adoc
+++ b/components/camel-test-junit5/src/main/docs/test-junit5.adoc
@@ -44,3 +44,30 @@ public class SimpleMockTest extends CamelTestSupport {
 }
 ----
 
+== Migrating Camel Tests from JUnit 4 to JUnit 5
+Find below some hints to help in migrating camel tests from JUnit 4 to JUnit 5.
+
+=== Referencing the JUnit 5 Camel Test library
+Projects using `camel-test` would need to use `camel-test-junit5`. For instance, maven users would update their pom.xml file as below:
+----
+<dependency>
+  <groupId>org.apache.camel</groupId>
+  <artifactId>camel-test-junit5</artifactId>
+  <scope>test</scope>
+</dependency>
+----
+
+=== Use the correct package
+Previous usage of `org.apache.camel.test.junit4.*` should be replaced with `org.apache.camel.test.junit5.*`.
+
+=== JUnit 5 typical migration steps
+Once Camel related steps have been done, there still are typical JUnit 5 migration steps to remember:
+* JUnit 5 assertions are located in a new namespace, for instance `import static org.junit.jupiter.api.Assertions.assertEquals`
+* For most assertions, the error message should be moved as last parameter
+* `import org.junit.Test` should be changed in favor of `import org.junit.jupiter.api.Test`
+* `org.junit.Ignore` should be changed in favor of `org.junit.jupiter.api.Disabled`
+* `org.junit.Before` should be changed in favor of `org.junit.jupiter.api.BeforeEach`
+* `org.junit.BeforeClass` should be changed in favor of `import org.junit.jupiter.api.BeforeAll`
+* JUnit don't ship assertThat methods anymore, for instance `org.junit.Assert.assertThat` could be replaced with `org.hamcrest.MatcherAssert.assertThat`
+* TODO: You may need to import a specific hamcrest library, e.g. `maven org.hamcrest:java-hamcrest:jar:2.0.0.0:test`
+* TODO: show imports that have been moved to TestSupport
diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/CamelRouteCoverageDumper.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/CamelRouteCoverageDumper.java
new file mode 100644
index 0000000..ff3252a
--- /dev/null
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/CamelRouteCoverageDumper.java
@@ -0,0 +1,190 @@
+/*
+ * 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;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.management.AttributeNotFoundException;
+import javax.management.InstanceNotFoundException;
+import javax.management.MBeanException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+
+import org.apache.camel.Route;
+import org.apache.camel.api.management.ManagedCamelContext;
+import org.apache.camel.api.management.mbean.ManagedCamelContextMBean;
+import org.apache.camel.api.management.mbean.ManagedProcessorMBean;
+import org.apache.camel.api.management.mbean.ManagedRouteMBean;
+import org.apache.camel.model.ModelCamelContext;
+import org.apache.camel.util.IOHelper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A <code>CamelRouteCoverageDumper</code> instance dumps the route coverage of
+ * a given camel test.
+ */
+public class CamelRouteCoverageDumper {
+
+    private static final Logger LOG = LoggerFactory.getLogger(CamelRouteCoverageDumper.class);
+
+    public void dump(ManagedCamelContextMBean managedCamelContext, ModelCamelContext context, String dumpDir, String dumpFilename, String testClass, String testName,
+                     long testTimeTaken)
+        throws Exception {
+        logCoverageSummary(managedCamelContext, context);
+
+        String routeCoverageAsXml = managedCamelContext.dumpRoutesCoverageAsXml();
+        String combined = "<camelRouteCoverage>\n" + gatherTestDetailsAsXml(testClass, testName, testTimeTaken) + routeCoverageAsXml + "\n</camelRouteCoverage>";
+
+        File dumpFile = new File(dumpDir);
+        // ensure dir exists
+        dumpFile.mkdirs();
+        dumpFile = new File(dumpDir, dumpFilename);
+
+        LOG.info("Dumping route coverage to file: {}", dumpFile);
+        InputStream is = new ByteArrayInputStream(combined.getBytes());
+        OutputStream os = new FileOutputStream(dumpFile, false);
+        IOHelper.copyAndCloseInput(is, os);
+        IOHelper.close(os);
+    }
+
+    /**
+     * Groups all processors from Camel context by route id.
+     */
+    private Map<String, List<ManagedProcessorMBean>> findProcessorsForEachRoute(MBeanServer server, ModelCamelContext context)
+        throws MalformedObjectNameException, MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException {
+        String domain = context.getManagementStrategy().getManagementAgent().getMBeanServerDefaultDomain();
+
+        Map<String, List<ManagedProcessorMBean>> processorsForRoute = new HashMap<>();
+
+        ObjectName processorsObjectName = new ObjectName(domain + ":context=" + context.getManagementName() + ",type=processors,name=*");
+        Set<ObjectName> objectNames = server.queryNames(processorsObjectName, null);
+
+        for (ObjectName objectName : objectNames) {
+            String routeId = server.getAttribute(objectName, "RouteId").toString();
+            String name = objectName.getKeyProperty("name");
+            name = ObjectName.unquote(name);
+
+            ManagedProcessorMBean managedProcessor = context.getExtension(ManagedCamelContext.class).getManagedProcessor(name);
+
+            if (managedProcessor != null) {
+                if (processorsForRoute.get(routeId) == null) {
+                    List<ManagedProcessorMBean> processorsList = new ArrayList<>();
+                    processorsList.add(managedProcessor);
+
+                    processorsForRoute.put(routeId, processorsList);
+                } else {
+                    processorsForRoute.get(routeId).add(managedProcessor);
+                }
+            }
+        }
+
+        // sort processors by position in route definition
+        for (Map.Entry<String, List<ManagedProcessorMBean>> entry : processorsForRoute.entrySet()) {
+            Collections.sort(entry.getValue(), Comparator.comparing(ManagedProcessorMBean::getIndex));
+        }
+
+        return processorsForRoute;
+    }
+
+    /**
+     * Gathers test details as xml.
+     */
+    private String gatherTestDetailsAsXml(String testClass, String testName, long timeTaken) {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<test>\n");
+        sb.append("  <class>").append(testClass).append("</class>\n");
+        sb.append("  <method>").append(testName).append("</method>\n");
+        sb.append("  <time>").append(timeTaken).append("</time>\n");
+        sb.append("</test>\n");
+        return sb.toString();
+    }
+
+    /**
+     * Logs route coverage summary, including which routes are uncovered and
+     * what is the coverage of each processor in each route.
+     */
+    private void logCoverageSummary(ManagedCamelContextMBean managedCamelContext, ModelCamelContext context) throws Exception {
+        StringBuilder builder = new StringBuilder("\nCoverage summary\n");
+
+        int routes = managedCamelContext.getTotalRoutes();
+
+        long contextExchangesTotal = managedCamelContext.getExchangesTotal();
+
+        List<String> uncoveredRoutes = new ArrayList<>();
+
+        StringBuilder routesSummary = new StringBuilder();
+        routesSummary.append("\tProcessor coverage\n");
+
+        MBeanServer server = context.getManagementStrategy().getManagementAgent().getMBeanServer();
+
+        Map<String, List<ManagedProcessorMBean>> processorsForRoute = findProcessorsForEachRoute(server, context);
+
+        // log processor coverage for each route
+        for (Route route : context.getRoutes()) {
+            ManagedRouteMBean managedRoute = context.getExtension(ManagedCamelContext.class).getManagedRoute(route.getId());
+            if (managedRoute.getExchangesTotal() == 0) {
+                uncoveredRoutes.add(route.getId());
+            }
+
+            long routeCoveragePercentage = Math.round((double)managedRoute.getExchangesTotal() / contextExchangesTotal * 100);
+            routesSummary.append("\t\tRoute ").append(route.getId()).append(" total: ").append(managedRoute.getExchangesTotal()).append(" (").append(routeCoveragePercentage)
+                .append("%)\n");
+
+            if (server != null) {
+                List<ManagedProcessorMBean> processors = processorsForRoute.get(route.getId());
+                if (processors != null) {
+                    for (ManagedProcessorMBean managedProcessor : processors) {
+                        String processorId = managedProcessor.getProcessorId();
+                        long processorExchangesTotal = managedProcessor.getExchangesTotal();
+                        long processorCoveragePercentage = Math.round((double)processorExchangesTotal / contextExchangesTotal * 100);
+                        routesSummary.append("\t\t\tProcessor ").append(processorId).append(" total: ").append(processorExchangesTotal).append(" (")
+                            .append(processorCoveragePercentage).append("%)\n");
+                    }
+                }
+            }
+        }
+
+        int used = routes - uncoveredRoutes.size();
+
+        long contextPercentage = Math.round((double)used / routes * 100);
+        builder.append("\tRoute coverage: ").append(used).append(" out of ").append(routes).append(" routes used (").append(contextPercentage).append("%)\n");
+        builder.append("\t\tCamelContext (").append(managedCamelContext.getCamelId()).append(") total: ").append(contextExchangesTotal).append("\n");
+
+        if (uncoveredRoutes.size() > 0) {
+            builder.append("\t\tUncovered routes: ").append(uncoveredRoutes.stream().collect(Collectors.joining(", "))).append("\n");
+        }
+
+        builder.append(routesSummary);
+        LOG.info(builder.toString());
+    }
+
+}


[camel] 03/04: CAMEL-13826: Moved route coverage to a dedicated class

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

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

commit 4459363d656e4905cfdee72e9d103f5810d47684
Author: aldettinger <al...@gmail.com>
AuthorDate: Mon Aug 12 17:52:33 2019 +0200

    CAMEL-13826: Moved route coverage to a dedicated class
---
 .../apache/camel/test/junit5/CamelTestSupport.java | 152 +--------------------
 .../RouteProcessorDumpRouteCoverageTest.java       |  20 ++-
 2 files changed, 18 insertions(+), 154 deletions(-)

diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
index c7f24d8..1818a98 100644
--- a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
@@ -16,31 +16,12 @@
  */
 package org.apache.camel.test.junit5;
 
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.lang.annotation.Annotation;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
 import java.util.HashMap;
-import java.util.List;
 import java.util.Map;
 import java.util.Properties;
-import java.util.Set;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.stream.Collectors;
-
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
@@ -55,7 +36,6 @@ import org.apache.camel.NoSuchEndpointException;
 import org.apache.camel.Predicate;
 import org.apache.camel.Processor;
 import org.apache.camel.ProducerTemplate;
-import org.apache.camel.Route;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.RuntimeCamelException;
 import org.apache.camel.Service;
@@ -63,8 +43,6 @@ import org.apache.camel.ServiceStatus;
 import org.apache.camel.api.management.JmxSystemPropertyKeys;
 import org.apache.camel.api.management.ManagedCamelContext;
 import org.apache.camel.api.management.mbean.ManagedCamelContextMBean;
-import org.apache.camel.api.management.mbean.ManagedProcessorMBean;
-import org.apache.camel.api.management.mbean.ManagedRouteMBean;
 import org.apache.camel.builder.AdviceWithRouteBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
@@ -81,7 +59,7 @@ import org.apache.camel.spi.CamelBeanPostProcessor;
 import org.apache.camel.spi.Language;
 import org.apache.camel.spi.Registry;
 import org.apache.camel.support.EndpointHelper;
-import org.apache.camel.util.IOHelper;
+import org.apache.camel.test.CamelRouteCoverageDumper;
 import org.apache.camel.util.StopWatch;
 import org.apache.camel.util.StringHelper;
 import org.apache.camel.util.TimeUtils;
@@ -134,6 +112,7 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
     private static final ThreadLocal<AtomicInteger> TESTS = new ThreadLocal<>();
     private static final ThreadLocal<CamelTestSupport> INSTANCE = new ThreadLocal<>();
     private String currentTestName;
+    private CamelRouteCoverageDumper routeCoverageDumper = new CamelRouteCoverageDumper();
     // CHECKSTYLE:ON
 
     @Override
@@ -554,21 +533,7 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
                 LOG.warn("Cannot dump route coverage to file as JMX is not enabled. "
                          + "Add camel-management-impl JAR as dependency and/or override useJmx() method to enable JMX in the unit test classes.");
             } else {
-                logCoverageSummary(managedCamelContext);
-
-                String xml = managedCamelContext.dumpRoutesCoverageAsXml();
-                String combined = "<camelRouteCoverage>\n" + gatherTestDetailsAsXml() + xml + "\n</camelRouteCoverage>";
-
-                File file = new File(dir);
-                // ensure dir exists
-                file.mkdirs();
-                file = new File(dir, name);
-
-                LOG.info("Dumping route coverage to file: {}", file);
-                InputStream is = new ByteArrayInputStream(combined.getBytes());
-                OutputStream os = new FileOutputStream(file, false);
-                IOHelper.copyAndCloseInput(is, os);
-                IOHelper.close(os);
+                routeCoverageDumper.dump(managedCamelContext, context, dir, name, getClass().getName(), currentTestName, timeTaken());
             }
         }
         LOG.info("********************************************************************************");
@@ -618,117 +583,6 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
     }
 
     /**
-     * Logs route coverage summary: - which routes are uncovered - what is the
-     * coverage of each processor in each route
-     */
-    private void logCoverageSummary(ManagedCamelContextMBean managedCamelContext) throws Exception {
-        StringBuilder builder = new StringBuilder("\nCoverage summary\n");
-
-        int routes = managedCamelContext.getTotalRoutes();
-
-        long contextExchangesTotal = managedCamelContext.getExchangesTotal();
-
-        List<String> uncoveredRoutes = new ArrayList<>();
-
-        StringBuilder routesSummary = new StringBuilder();
-        routesSummary.append("\tProcessor coverage\n");
-
-        MBeanServer server = context.getManagementStrategy().getManagementAgent().getMBeanServer();
-
-        Map<String, List<ManagedProcessorMBean>> processorsForRoute = findProcessorsForEachRoute(server);
-
-        // log processor coverage for each route
-        for (Route route : context.getRoutes()) {
-            ManagedRouteMBean managedRoute = context.getExtension(ManagedCamelContext.class).getManagedRoute(route.getId());
-            if (managedRoute.getExchangesTotal() == 0) {
-                uncoveredRoutes.add(route.getId());
-            }
-
-            long routeCoveragePercentage = Math.round((double)managedRoute.getExchangesTotal() / contextExchangesTotal * 100);
-            routesSummary.append("\t\tRoute ").append(route.getId()).append(" total: ").append(managedRoute.getExchangesTotal()).append(" (").append(routeCoveragePercentage)
-                .append("%)\n");
-
-            if (server != null) {
-                List<ManagedProcessorMBean> processors = processorsForRoute.get(route.getId());
-                if (processors != null) {
-                    for (ManagedProcessorMBean managedProcessor : processors) {
-                        String processorId = managedProcessor.getProcessorId();
-                        long processorExchangesTotal = managedProcessor.getExchangesTotal();
-                        long processorCoveragePercentage = Math.round((double)processorExchangesTotal / contextExchangesTotal * 100);
-                        routesSummary.append("\t\t\tProcessor ").append(processorId).append(" total: ").append(processorExchangesTotal).append(" (")
-                            .append(processorCoveragePercentage).append("%)\n");
-                    }
-                }
-            }
-        }
-
-        int used = routes - uncoveredRoutes.size();
-
-        long contextPercentage = Math.round((double)used / routes * 100);
-        builder.append("\tRoute coverage: ").append(used).append(" out of ").append(routes).append(" routes used (").append(contextPercentage).append("%)\n");
-        builder.append("\t\tCamelContext (").append(managedCamelContext.getCamelId()).append(") total: ").append(contextExchangesTotal).append("\n");
-
-        if (uncoveredRoutes.size() > 0) {
-            builder.append("\t\tUncovered routes: ").append(uncoveredRoutes.stream().collect(Collectors.joining(", "))).append("\n");
-        }
-
-        builder.append(routesSummary);
-        LOG.info(builder.toString());
-    }
-
-    /**
-     * Groups all processors from Camel context by route id
-     */
-    private Map<String, List<ManagedProcessorMBean>> findProcessorsForEachRoute(MBeanServer server)
-        throws MalformedObjectNameException, MBeanException, AttributeNotFoundException, InstanceNotFoundException, ReflectionException {
-        String domain = context.getManagementStrategy().getManagementAgent().getMBeanServerDefaultDomain();
-
-        Map<String, List<ManagedProcessorMBean>> processorsForRoute = new HashMap<>();
-
-        ObjectName processorsObjectName = new ObjectName(domain + ":context=" + context.getManagementName() + ",type=processors,name=*");
-        Set<ObjectName> objectNames = server.queryNames(processorsObjectName, null);
-
-        for (ObjectName objectName : objectNames) {
-            String routeId = server.getAttribute(objectName, "RouteId").toString();
-            String name = objectName.getKeyProperty("name");
-            name = ObjectName.unquote(name);
-
-            ManagedProcessorMBean managedProcessor = context.getExtension(ManagedCamelContext.class).getManagedProcessor(name);
-
-            if (managedProcessor != null) {
-                if (processorsForRoute.get(routeId) == null) {
-                    List<ManagedProcessorMBean> processorsList = new ArrayList<>();
-                    processorsList.add(managedProcessor);
-
-                    processorsForRoute.put(routeId, processorsList);
-                } else {
-                    processorsForRoute.get(routeId).add(managedProcessor);
-                }
-            }
-        }
-
-        // sort processors by position in route definition
-        for (Map.Entry<String, List<ManagedProcessorMBean>> entry : processorsForRoute.entrySet()) {
-            Collections.sort(entry.getValue(), Comparator.comparing(ManagedProcessorMBean::getIndex));
-        }
-
-        return processorsForRoute;
-    }
-
-    /**
-     * Gathers test details as xml
-     */
-    private String gatherTestDetailsAsXml() {
-        StringBuilder sb = new StringBuilder();
-        sb.append("<test>\n");
-        sb.append("  <class>").append(getClass().getName()).append("</class>\n");
-        sb.append("  <method>").append(currentTestName).append("</method>\n");
-        sb.append("  <time>").append(timeTaken()).append("</time>\n");
-        sb.append("</test>\n");
-        return sb.toString();
-    }
-
-    /**
      * Returns the timeout to use when shutting down (unit in seconds).
      * <p/>
      * Will default use 10 seconds.
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
index b97959c..e5a99e0 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/RouteProcessorDumpRouteCoverageTest.java
@@ -19,11 +19,14 @@ package org.apache.camel.test.junit5.patterns;
 import org.apache.camel.RoutesBuilder;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.AfterAll;
 import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.TestInfo;
+import org.junit.jupiter.api.TestReporter;
 
 import static org.apache.camel.test.junit5.TestSupport.assertFileExists;
 import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
 
 public class RouteProcessorDumpRouteCoverageTest extends CamelTestSupport {
 
@@ -38,12 +41,19 @@ public class RouteProcessorDumpRouteCoverageTest extends CamelTestSupport {
         assertEquals("Bye World", out);
     }
 
-    @Override
-    @AfterEach
-    public void tearDown() throws Exception {
-        super.tearDown();
+    @Test
+    public void testProcessorJunit5WithTestParameterInjection(TestInfo info, TestReporter testReporter) throws Exception {
+        assertNotNull(info);
+        assertNotNull(testReporter);
+        String out = template.requestBody("direct:start", "Hello World", String.class);
+        assertEquals("Bye World", out);
+    }
+
+    @AfterAll
+    public static void checkDumpFilesCreatedAfterTests() {
         // should create that file when test is done
         assertFileExists("target/camel-route-coverage/RouteProcessorDumpRouteCoverageTest-testProcessorJunit5.xml");
+        assertFileExists("target/camel-route-coverage/RouteProcessorDumpRouteCoverageTest-testProcessorJunit5WithTestParameterInjection.xml");
     }
 
     @Override


[camel] 02/04: CAMEL-13826: Removed deprecated methods and class

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

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

commit ab05cfe44f6c0b80e398a99f62c1772c1b2fdf64
Author: aldettinger <al...@gmail.com>
AuthorDate: Mon Aug 12 14:50:52 2019 +0200

    CAMEL-13826: Removed deprecated methods and class
---
 .../apache/camel/test/junit5/CamelTestSupport.java | 85 +---------------------
 .../patterns/DebugNoLazyTypeConverterTest.java     |  5 --
 .../src/test/resources/jndi.properties             | 22 ------
 3 files changed, 1 insertion(+), 111 deletions(-)

diff --git a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
index d324389..c7f24d8 100644
--- a/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
+++ b/components/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/CamelTestSupport.java
@@ -26,7 +26,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
-import java.util.Hashtable;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -42,8 +41,6 @@ import javax.management.MBeanServer;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
 import javax.management.ReflectionException;
-import javax.naming.Context;
-import javax.naming.InitialContext;
 
 import org.apache.camel.CamelContext;
 import org.apache.camel.ConsumerTemplate;
@@ -73,7 +70,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.component.properties.PropertiesComponent;
 import org.apache.camel.impl.DefaultCamelContext;
-import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.impl.engine.InterceptSendToMockEndpointStrategy;
 import org.apache.camel.model.Model;
 import org.apache.camel.model.ModelCamelContext;
@@ -753,17 +749,6 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
     }
 
     /**
-     * Whether or not type converters should be lazy loaded (notice core
-     * converters is always loaded)
-     *
-     * @return <tt>false</tt> by default.
-     */
-    @Deprecated
-    protected boolean isLazyLoadingTypeConverter() {
-        return false;
-    }
-
-    /**
      * Override this method to include and override properties with the Camel
      * {@link PropertiesComponent}.
      *
@@ -884,22 +869,7 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
     }
 
     protected CamelContext createCamelContext() throws Exception {
-        // for backwards compatibility
-        Registry registry = createRegistry();
-        if (registry instanceof FakeJndiRegistry) {
-            boolean inUse = ((FakeJndiRegistry)registry).isInUse();
-            if (!inUse) {
-                registry = null;
-            }
-        }
-        if (registry != null) {
-            String msg = "createRegistry() from camel-test is deprecated. Use createCamelRegistry if you want to control which registry to use, however"
-                         + " if you need to bind beans to the registry then this is possible already with the bind method on registry,"
-                         + " and there is no need to override this method.";
-            LOG.warn(msg);
-        } else {
-            registry = createCamelRegistry();
-        }
+        Registry registry = createCamelRegistry();
 
         CamelContext context;
         if (registry != null) {
@@ -929,59 +899,6 @@ public abstract class CamelTestSupport implements BeforeEachCallback, AfterAllCa
     }
 
     /**
-     * @deprecated use createCamelRegistry if you want to control which registry
-     *             to use, however if you need to bind beans to the registry
-     *             then this is possible already with the bind method on
-     *             registry, and there is no need to override this method.
-     */
-    @Deprecated
-    protected JndiRegistry createRegistry() throws Exception {
-        return new FakeJndiRegistry(createJndiContext());
-    }
-
-    /**
-     * @deprecated use createCamelRegistry if you want to control which registry
-     *             to use, however if you need to bind beans to the registry
-     *             then this is possible already with the bind method on
-     *             registry, and there is no need to use JndiRegistry and
-     *             override this method.
-     */
-    @Deprecated
-    protected Context createJndiContext() throws Exception {
-        Properties properties = new Properties();
-
-        // jndi.properties is optional
-        InputStream in = getClass().getClassLoader().getResourceAsStream("jndi.properties");
-        if (in != null) {
-            LOG.debug("Using jndi.properties from classpath root");
-            properties.load(in);
-        } else {
-            properties.put("java.naming.factory.initial", "org.apache.camel.support.jndi.CamelInitialContextFactory");
-        }
-        return new InitialContext(new Hashtable<>(properties));
-    }
-
-    private class FakeJndiRegistry extends JndiRegistry {
-
-        private boolean inUse;
-
-        public FakeJndiRegistry(Context context) {
-            super(context);
-        }
-
-        @Override
-        public void bind(String name, Object object) {
-            super.bind(name, object);
-            inUse = true;
-        }
-
-        public boolean isInUse() {
-            // only if the end user bind beans then its in use
-            return inUse;
-        }
-    }
-
-    /**
      * Factory method which derived classes can use to create a
      * {@link RouteBuilder} to define the routes for testing
      */
diff --git a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
index a9cb78f..056efae 100644
--- a/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
+++ b/components/camel-test-junit5/src/test/java/org/apache/camel/test/junit5/patterns/DebugNoLazyTypeConverterTest.java
@@ -29,11 +29,6 @@ public class DebugNoLazyTypeConverterTest extends CamelTestSupport {
 
     private static final Logger LOG = LoggerFactory.getLogger(DebugNoLazyTypeConverterTest.class);
 
-    @Override
-    protected boolean isLazyLoadingTypeConverter() {
-        return false;
-    }
-
     // START SNIPPET: e1
     @Override
     public boolean isUseDebugger() {
diff --git a/components/camel-test-junit5/src/test/resources/jndi.properties b/components/camel-test-junit5/src/test/resources/jndi.properties
deleted file mode 100644
index 7f9b32b..0000000
--- a/components/camel-test-junit5/src/test/resources/jndi.properties
+++ /dev/null
@@ -1,22 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-# START SNIPPET: jndi
-
-java.naming.factory.initial = org.apache.camel.support.jndi.CamelInitialContextFactory
-
-# END SNIPPET: jndi