You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2024/03/21 13:33:59 UTC
(camel-spring-boot) 01/04: Reformat using formatter plugin
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
commit 8ed3d11ae54c44244e6f97e9454fe7841a69e70a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 21 13:36:25 2024 +0100
Reformat using formatter plugin
---
.../catalog/SpringBootRuntimeProvider.java | 4 +-
.../test/AvroGenericMarshaAndUnmarshaTest.java | 22 +-
.../test/AvroMarshalAndUnmarshallTest.java | 28 +-
.../test/AvroMarshalAndUnmarshallXmlTest.java | 21 +-
.../dataformat/avro/springboot/test/Value.java | 223 +++---
.../camel/component/aws2/cw/CwComponentTest.java | 15 +-
.../component/aws2/ddb/Ddb2BatchGetItemsTest.java | 40 +-
.../component/aws2/ddb/Ddb2DeleteItemTest.java | 17 +-
.../component/aws2/ddb/Ddb2DeleteTableTest.java | 21 +-
.../aws2/ddb/Ddb2DescribeTableRuleIT.java | 16 +-
.../camel/component/aws2/ddb/Ddb2GetItemTest.java | 16 +-
.../camel/component/aws2/ddb/Ddb2QueryTest.java | 57 +-
.../camel/component/aws2/ddb/Ddb2ScanTest.java | 49 +-
.../component/aws2/ddb/Ddb2UpdateItemTest.java | 20 +-
.../aws2/ddb/Ddb2UpdateTableByIdTest.java | 17 +-
.../component/aws2/ddbstream/Ddb2StreamTest.java | 99 +--
.../aws2/kinesis/KinesisComponentTest.java | 18 +-
.../component/aws2/s3/S3BatchConsumerTest.java | 21 +-
.../camel/component/aws2/s3/S3ComponentTest.java | 16 +-
.../aws2/s3/S3CopyObjectCustomerKeyTest.java | 27 +-
.../aws2/s3/S3CopyObjectOperationTest.java | 11 +-
.../aws2/s3/S3CreateDownloadLinkOperationTest.java | 12 +-
.../aws2/s3/S3ListObjectsOperationTest.java | 13 +-
.../aws2/s3/S3MoveAfterReadConsumerTest.java | 38 +-
.../aws2/s3/S3MultipartUploadOperationTest.java | 15 +-
.../aws2/s3/S3ObjectRangeOperationTest.java | 12 +-
.../camel/component/aws2/s3/S3PojoAsBodyTest.java | 14 +-
.../s3/S3SimpleEncryptedUploadOperationTest.java | 16 +-
.../aws2/s3/S3StreamUploadOperationTest.java | 16 +-
.../aws2/sns/SnsAdvancedConfigurationTest.java | 23 +-
.../component/aws2/sns/SnsComponentFifoTest.java | 16 +-
.../aws2/sns/SnsTopicProducerCustomConfigTest.java | 21 +-
.../component/aws2/sns/SnsTopicProducerTest.java | 15 +-
.../sns/SnsTopicProducerWithSubscriptionTest.java | 38 +-
.../aws2/sns/SnsTopicWithKmsEncryptionTest.java | 11 +-
.../apache/camel/component/aws2/sqs/BaseSqs.java | 7 +-
.../component/aws2/sqs/JmsStyleSelectorTest.java | 21 +-
.../camel/component/aws2/sqs/SqsComponentTest.java | 23 +-
.../component/aws2/sqs/SqsDeadletterTest.java | 18 +-
.../component/aws2/sqs/SqsDelayedQueueTest.java | 28 +-
.../component/aws2/sqs/SqsOperationsTest.java | 69 +-
.../aws2/sqs/SqsProducerAutoCreateQueueTest.java | 27 +-
.../bean/springboot/BeanComponentConverter.java | 12 +-
.../springboot/ClassComponentConverter.java | 12 +-
.../integration/CassandraComponentBeanRefIT.java | 21 +-
.../integration/CassandraComponentConsumerIT.java | 26 +-
.../integration/CassandraComponentProducerIT.java | 81 +-
.../CassandraComponentProducerUnpreparedIT.java | 46 +-
.../cassandra/springboot/BaseCassandra.java | 25 +-
.../cassandra/CassandraAggregationIT.java | 21 +-
.../CassandraAggregationRepositoryIT.java | 15 +-
.../CassandraAggregationSerializedHeadersIT.java | 21 +-
.../NamedCassandraAggregationRepositoryIT.java | 19 +-
.../cassandra/CassandraIdempotentIT.java | 20 +-
.../cassandra/CassandraIdempotentRepositoryIT.java | 17 +-
.../NamedCassandraIdempotentRepositoryIT.java | 20 +-
.../ConsulServiceDiscoveryAutoConfiguration.java | 8 +-
.../ConsulServiceRegistryAutoConfiguration.java | 3 +-
.../cloud/ConsulServiceRegistryConfiguration.java | 33 +-
.../ConsulClusterServiceAutoConfiguration.java | 48 +-
.../cluster/ConsulClusterServiceConfiguration.java | 14 +-
.../cloud/ConsulServiceDiscoveryTest.java | 26 +-
.../component/cron/springboot/CronLoaderTest.java | 32 +-
.../springboot/DisruptorComponentConverter.java | 20 +-
.../springboot/DisruptorVmComponentConverter.java | 20 +-
.../cloud/DnsCloudAutoConfiguration.java | 8 +-
.../springboot/cloud/DnsServiceDiscoveryTest.java | 26 +-
.../customizer/CacheConfigurationCustomizer.java | 26 +-
.../CacheConfigurationCustomizerConfiguration.java | 7 +-
.../customizer/CacheManagerCustomizer.java | 24 +-
.../CacheManagerCustomizerConfiguration.java | 1 -
...heConfigurationCustomizerEnabledAppendTest.java | 58 +-
...eConfigurationCustomizerEnabledReplaceTest.java | 58 +-
...onfigurationCustomizerNotEnabledGlobalTest.java | 10 +-
...urationCustomizerNotEnabledOnComponentTest.java | 14 +-
...CacheConfigurationCustomizerNotEnabledTest.java | 10 +-
...eConfigurationCustomizerNotEnabledTestBase.java | 23 +-
...cheManagerCustomizerEnabledOnComponentTest.java | 11 +-
.../CacheManagerCustomizerEnabledTest.java | 13 +-
.../CacheManagerCustomizerNoOverrideTest.java | 18 +-
...CacheManagerCustomizerNotEnabledGlobalTest.java | 10 +-
...ManagerCustomizerNotEnabledOnComponentTest.java | 11 +-
.../CacheManagerCustomizerNotEnabledTest.java | 10 +-
.../CacheManagerCustomizerOverrideTest.java | 15 +-
.../customizer/CacheManagerCustomizerTest.java | 8 +-
...heManagerCustomizerWithoutCacheManagerTest.java | 9 +-
.../component/fhir/AbstractFhirTestSupport.java | 4 +-
.../component/fhir/CustomFhirConfiguration.java | 2 +-
.../fhir/CustomNoFhirServerUrlCamelContext.java | 2 +-
.../camel/component/fhir/DefaultCamelContext.java | 2 +-
.../camel/component/fhir/FhirCapabilitiesIT.java | 25 +-
.../camel/component/fhir/FhirConfigurationIT.java | 20 +-
.../apache/camel/component/fhir/FhirCreateIT.java | 22 +-
.../fhir/FhirCustomClientConfigurationIT.java | 36 +-
.../apache/camel/component/fhir/FhirDeleteIT.java | 30 +-
.../component/fhir/FhirExtraParametersIT.java | 17 +-
.../apache/camel/component/fhir/FhirHistoryIT.java | 24 +-
.../camel/component/fhir/FhirLoadPageIT.java | 45 +-
.../apache/camel/component/fhir/FhirMetaIT.java | 35 +-
.../camel/component/fhir/FhirOperationIT.java | 39 +-
.../apache/camel/component/fhir/FhirPatchIT.java | 26 +-
.../apache/camel/component/fhir/FhirReadIT.java | 41 +-
.../apache/camel/component/fhir/FhirSearchIT.java | 17 +-
.../apache/camel/component/fhir/FhirServer.java | 9 +-
.../apache/camel/component/fhir/FhirSimpleIT.java | 18 +-
.../camel/component/fhir/FhirTransactionIT.java | 30 +-
.../apache/camel/component/fhir/FhirUpdateIT.java | 41 +-
.../camel/component/fhir/FhirValidateIT.java | 28 +-
.../fhir/Hl7v2PatientToFhirPatientIT.java | 55 +-
.../camel/component/fhir/PatientProcessor.java | 5 +-
.../fhir/dataformat/FhirJsonDataFormatTest.java | 24 +-
.../FhirJsonDataformatErrorHandlerTest.java | 19 +-
.../fhir/dataformat/FhirXmlDataFormatTest.java | 26 +-
.../FhirXmlDataformatErrorHandlerTest.java | 15 +-
.../FileLockClusterServiceAutoConfiguration.java | 22 +-
.../file/AntPathMatcherGenericFileFilterTest.java | 12 +-
.../org/apache/camel/component/file/BaseFile.java | 11 +-
.../file/FileBeginFailureOneTimeTest.java | 38 +-
.../component/file/FileBridgeErrorHandlerTest.java | 12 +-
.../component/file/FileBrowsableEndpointTest.java | 11 +-
.../FileChangedReadLockMarkerFileFalseTest.java | 15 +-
.../FileConsumerAbsolutePathDefaultMoveTest.java | 10 +-
.../component/file/FileConsumerBatchTest.java | 11 +-
.../file/FileConsumerFileExpressionTest.java | 24 +-
.../component/file/FileConsumerFileFilterTest.java | 21 +-
.../component/file/FileConsumerIdempotentTest.java | 9 +-
.../file/FileConsumerMoveAndMoveFailureTest.java | 9 +-
.../component/file/FileConsumerPreMoveTest.java | 39 +-
...ileIdempotentReadLockWithFileIdempRepoTest.java | 13 +-
.../file/FileIdempotentReadSameFileAgainTest.java | 11 +-
.../component/file/FileProduceTempPrefixTest.java | 9 +-
.../file/FileProducerCharsetUTFtoISOTest.java | 12 +-
.../component/file/FileProducerExpressionTest.java | 7 +-
.../file/FileProducerFileExistOverrideTest.java | 10 +-
.../FileProducerOverruleToDifferentFolderTest.java | 15 +-
...eProducerRecursivelayToDifferentFolderTest.java | 15 +-
.../component/file/FileProducerStreamTest.java | 9 +-
.../camel/component/file/FileSorterRefTest.java | 18 +-
.../component/file/FileToFileWithFlattenTest.java | 7 +-
.../file/FilerConsumerDoneFileNamePrefixTest.java | 9 +-
.../file/FilerProducerDoneFileNameRouteTest.java | 9 +-
.../file/FromFileMoveFileIfProcessFailsTest.java | 9 +-
.../file/remote/springboot/AbstractBaseFtp.java | 5 +-
.../file/remote/springboot/ftp/BaseFtp.java | 1 -
.../remote/springboot/ftp/FromFtpFilterTest.java | 13 +-
.../ftp/FromFtpMoveFileRecursiveTest.java | 13 +-
.../springboot/ftp/FromFtpToBinaryFileTest.java | 20 +-
.../remote/springboot/ftp/FtpAnonymousTest.java | 13 +-
.../ftp/FtpConsumerMaxMessagesPerPollTest.java | 16 +-
.../remote/springboot/ftp/FtpEmbeddedService.java | 12 +-
.../springboot/ftp/FtpProducerConcurrentTest.java | 14 +-
...FtpSimpleConsumeStreamingStepwiseFalseTest.java | 16 +-
.../FtpSimpleConsumeStreamingStepwiseTrueTest.java | 11 +-
.../remote/springboot/ftp/FtpSoTimeoutTest.java | 14 +-
.../remote/springboot/ftps/BaseFtpsClientAuth.java | 1 -
.../ftps/BaseFtpsImplicitClientAuth.java | 1 -
.../FileToFtpsImplicitSSLWithClientAuthTest.java | 17 +-
...leToFtpsWithCustomTrustStorePropertiesTest.java | 17 +-
.../springboot/ftps/FtpsEmbeddedService.java | 5 +-
.../ftps/FtpsImplicitEmbeddedService.java | 3 +-
.../file/remote/springboot/ftps/FtpsTest.java | 15 +-
.../file/remote/springboot/sftp/BaseSftp.java | 1 -
.../sftp/SftpConsumerLocalWorkDirectoryTest.java | 16 +-
.../springboot/sftp/SftpEmbeddedService.java | 7 +-
.../sftp/SftpKeyExchangeProtocolsTest.java | 39 +-
.../springboot/sftp/SftpSetOperationsTest.java | 11 +-
.../sftp/SftpSimpleProduceThroughProxyTest.java | 38 +-
.../springboot/sftp/SftpUseListFalseTest.java | 14 +-
.../gson/springboot/GsonConcurrentTest.java | 12 +-
.../gson/springboot/GsonFieldNamePolicyTest.java | 15 +-
.../gson/springboot/GsonJsonDataFormatTest.java | 13 +-
.../gson/springboot/GsonMarshalExclusionTest.java | 38 +-
.../gson/springboot/GsonMarshalListTest.java | 14 +-
.../component/gson/springboot/GsonMarshalTest.java | 18 +-
.../GsonUnmarshalTypeFromHeaderTest.java | 19 +-
.../springboot/SpringGsonFieldNamePolicyTest.java | 19 +-
.../springboot/SpringGsonJsonDataFormatTest.java | 28 +-
.../SpringGsonUnmarshalTypeFromHeaderTest.java | 18 +-
.../gson/springboot/TestPojoExclusion.java | 1 -
.../hl7/springboot/test/AckExpressionTest.java | 56 +-
.../hl7/springboot/test/ConvertLineFeedTest.java | 18 +-
.../hl7/springboot/test/HL7ByteArrayRouteTest.java | 38 +-
.../hl7/springboot/test/HL7DataFormatTest.java | 27 +-
.../springboot/test/HL7MLLPCodecBoundaryTest.java | 20 +-
.../hl7/springboot/test/HL7MLLPCodecLongTest.java | 15 +-
.../test/HL7MLLPCodecMessageFloodingTest.java | 34 +-
.../test/HL7MLLPCodecPlainStringTest.java | 21 +-
.../test/HL7MLLPCodecStandAndEndBytesTest.java | 23 +-
.../hl7/springboot/test/HL7MLLPCodecTest.java | 24 +-
.../test/HL7MLLPNettyCodecBoundaryTest.java | 25 +-
.../test/HL7MLLPNettyCodecByteArrayRouteTest.java | 39 +-
.../springboot/test/HL7MLLPNettyCodecLongTest.java | 15 +-
.../HL7MLLPNettyCodecStandAndEndBytesTest.java | 22 +-
.../hl7/springboot/test/HL7MLLPNettyCodecTest.java | 22 +-
.../test/HL7MLLPNettyDecoderResourceLeakTest.java | 20 +-
.../springboot/test/HL7MLLPNettyRouteToTest.java | 20 +-
.../hl7/springboot/test/HL7NettyRouteTest.java | 43 +-
.../hl7/springboot/test/HL7RouteTest.java | 39 +-
.../hl7/springboot/test/HL7ValidateTest.java | 42 +-
.../hl7/springboot/test/HL7XmlDataFormatTest.java | 32 +-
.../hl7/springboot/test/MessageValidatorTest.java | 40 +-
.../hl7/springboot/test/TerserExpressionTest.java | 41 +-
.../springboot/HttpComponentTimeoutConverter.java | 1 -
.../HttpComponentTimeoutConverterTest.java | 31 +-
...ispanRemoteClusterServiceAutoConfiguration.java | 9 +-
...nfinispanRemoteClusterServiceConfiguration.java | 2 +-
.../InfinispanIdempotentRepositoryTestSupport.java | 4 +-
.../infinispan/InfinispanProducerTestSupport.java | 382 +++-------
.../InfinispanRemoteAggregationRepositoryIT.java | 100 ++-
...panRemoteAggregationRepositoryOperationsIT.java | 7 +-
.../remote/InfinispanRemoteConfigurationIT.java | 126 ++--
.../remote/InfinispanRemoteConsumerIT.java | 84 +--
.../remote/InfinispanRemoteCustomListenerIT.java | 119 ++-
.../InfinispanRemoteIdempotentRepositoryIT.java | 85 +--
.../remote/InfinispanRemoteProducerIT.java | 130 ++--
.../remote/InfinispanRemoteQueryConsumerIT.java | 208 +++---
.../remote/InfinispanRemoteQueryProducerIT.java | 239 +++---
.../remote/InfinispanRemoteQueryTestSupport.java | 92 ++-
.../remote/InfinispanRemoteTestSupport.java | 205 +++--
.../InfinispanRemoteClusteredTestSupport.java | 49 +-
.../cluster/InfinispanRemoteClusteredViewIT.java | 67 +-
...nfinispanRemoteIdempotentRepositoryCamelIT.java | 31 +-
...finispanRemoteIdempotentRepositorySpringIT.java | 61 +-
...ispanRemoteIdempotentRepositoryTestSupport.java | 98 ++-
.../test/JacksonAvroLookupResolverTest.java | 34 +-
.../JacksonAvroMarshalUnmarshalJsonNodeTest.java | 21 +-
.../JacksonAvroMarshalUnmarshalPojoListTest.java | 31 +-
.../test/JacksonAvroMarshalUnmarshalPojoTest.java | 35 +-
.../JacksonProtobufLookupResolverTest.java | 34 +-
...acksonProtobufMarshalUnmarshalJsonNodeTest.java | 31 +-
.../JacksonProtobufMarshalUnmarshalPojoTest.java | 31 +-
...ptablePropertySourcesPlaceholderConfigurer.java | 38 +-
...JasyptEncryptedPropertiesAutoconfiguration.java | 24 +-
.../JasyptEncryptedPropertiesConfiguration.java | 14 +-
.../springboot/JasyptEncryptedPropertiesUtils.java | 49 +-
.../JasyptSpringEncryptedPropertiesParser.java | 5 +-
...ptedPropertiesIvGeneratorAutoDetectionTest.java | 13 +-
.../component/jasypt/springboot/Constants.java | 1 -
.../jasypt/springboot/EncryptedPropertiesBean.java | 1 -
...ptedPropertiesCustomConfigurationBeansTest.java | 13 +-
...ertiesDisabledCustomConfigurationBeansTest.java | 18 +-
.../EncryptedPropertiesDisabledTest.java | 16 +-
...esIvGeneratorAutoDetectionBouncyCastleTest.java | 15 +-
...ptedPropertiesIvGeneratorAutoDetectionTest.java | 6 +-
.../jasypt/springboot/EncryptedPropertiesTest.java | 6 +-
.../springboot/EncryptedPropertiesTestBase.java | 8 +-
.../springboot/EncryptedPropertiesUtilsTest.java | 13 +-
.../camel/component/jasypt/springboot/Routes.java | 12 +-
...JGroupsRaftClusterServiceAutoConfiguration.java | 12 +-
...JGroupsLockClusterServiceAutoConfiguration.java | 9 +-
.../JGroupsLockClusterServiceConfiguration.java | 1 -
.../springboot/test/AddCommentProducerTest.java | 51 +-
.../springboot/test/AddIssueLinkProducerTest.java | 73 +-
.../jira/springboot/test/AddIssueProducerTest.java | 58 +-
.../springboot/test/AddWorkLogProducerTest.java | 67 +-
.../springboot/test/AttachFileProducerTest.java | 63 +-
.../springboot/test/DeleteIssueProducerTest.java | 53 +-
.../springboot/test/FetchCommentsProducerTest.java | 48 +-
.../springboot/test/FetchIssueProducerTest.java | 50 +-
.../jira/springboot/test/JiraTestConstants.java | 3 +-
.../springboot/test/NewCommentsConsumerTest.java | 56 +-
.../springboot/test/NewIssuesConsumerTest.java | 53 +-
.../test/TransitionIssueProducerTest.java | 50 +-
.../springboot/test/UpdateIssueProducerTest.java | 62 +-
.../component/jira/springboot/test/Utils.java | 65 +-
.../springboot/test/WatchUpdatesConsumerTest.java | 62 +-
.../jira/springboot/test/WatcherProducerTest.java | 63 +-
.../test/EasyJsonPathWithRootSimpleCBRTest.java | 46 +-
.../test/EasyJsonPathWithSimpleCBRTest.java | 46 +-
.../test/JsonPathBeanStreamCachingTest.java | 21 +-
.../test/JsonPathBeanSuppressExceptionsTest.java | 18 +-
.../jsonpath/springboot/test/JsonPathBeanTest.java | 20 +-
.../jsonpath/springboot/test/JsonPathCBRTest.java | 63 +-
.../springboot/test/JsonPathCharsetTest.java | 13 +-
.../test/JsonPathExchangePropertyTest.java | 18 +-
.../springboot/test/JsonPathHeaderNameTest.java | 17 +-
.../springboot/test/JsonPathLanguageTest.java | 16 +-
.../springboot/test/JsonPathMapTransformTest.java | 20 +-
.../springboot/test/JsonPathMockMatchesTest.java | 16 +-
.../springboot/test/JsonPathPlatformHttpTest.java | 33 +-
.../springboot/test/JsonPathPojoTransformTest.java | 19 +-
.../springboot/test/JsonPathSourceTest.java | 53 +-
.../springboot/test/JsonPathSplitTest.java | 39 +-
.../test/JsonPathSplitWriteAsStringMapTest.java | 24 +-
.../test/JsonPathSplitWriteAsStringTest.java | 27 +-
.../test/JsonPathStreamCachingCBRTest.java | 62 +-
.../springboot/test/JsonPathSuppressTest.java | 27 +-
.../test/JsonPathTransformHeaderNameTest.java | 19 +-
.../test/JsonPathTransformONielEscapedTest.java | 15 +-
.../JsonPathTransformONielPlaceholderTest.java | 23 +-
.../test/JsonPathTransformONielTest.java | 15 +-
.../test/JsonPathTransformResultTypeTest.java | 21 +-
.../springboot/test/JsonPathTransformTest.java | 16 +-
.../springboot/test/JsonPathWithSimpleCBRTest.java | 49 +-
.../springboot/test/SpringJsonPathCBRTest.java | 24 +-
.../test/SpringJsonPathSplitWriteAsStringTest.java | 23 +-
.../test/SpringJsonPathSuppressTest.java | 20 +-
.../SpringJsonPathTransformHeaderNameTest.java | 19 +-
.../SpringJsonPathTransformResultTypeTest.java | 18 +-
.../test/SpringJsonPathTransformTest.java | 16 +-
.../integration/BaseEmbeddedKafkaTestSupport.java | 2 +-
.../KafkaConsumerAsyncManualCommitIT.java | 35 +-
.../integration/KafkaConsumerBatchSizeIT.java | 11 +-
.../kafka/integration/KafkaConsumerFullIT.java | 30 +-
.../integration/KafkaConsumerHealthCheckIT.java | 28 +-
.../integration/KafkaConsumerIdempotentIT.java | 21 +-
.../KafkaConsumerIdempotentTestSupport.java | 4 +-
...kaConsumerIdempotentWithCustomSerializerIT.java | 22 +-
.../KafkaConsumerIdempotentWithProcessorIT.java | 29 +-
.../KafkaConsumerLastRecordHeaderIT.java | 16 +-
.../integration/KafkaConsumerManualCommitIT.java | 18 +-
.../integration/KafkaConsumerRebalanceIT.java | 18 +-
.../integration/KafkaConsumerTopicIsPatternIT.java | 20 +-
.../kafka/integration/KafkaProducerFullIT.java | 90 +--
.../component/kafka/integration/KafkaToDIT.java | 10 +-
.../OffsetStateRepositoryConfiguration.java | 4 +-
.../kafka/clients/consumer/KafkaConsumerTest.java | 7 +-
.../kamelet/springboot/KameletBasicTest.java | 42 +-
.../kamelet/springboot/KameletComponentTest.java | 22 +-
.../kamelet/springboot/KameletConsumeOnlyTest.java | 18 +-
.../springboot/KameletConsumerUoWIssueTest.java | 17 +-
.../kamelet/springboot/KameletDiscoveryTest.java | 28 +-
.../springboot/KameletEipAggregateGroovyTest.java | 35 +-
.../springboot/KameletEipAggregateJoorTest.java | 37 +-
.../springboot/KameletEipAggregateTest.java | 24 +-
.../kamelet/springboot/KameletEipFilterTest.java | 17 +-
.../springboot/KameletEipMulticastTest.java | 53 +-
.../springboot/KameletEipNoChildrenTest.java | 16 +-
.../kamelet/springboot/KameletEipTest.java | 16 +-
.../springboot/KameletGlobalPropertiesTest.java | 289 ++++----
.../springboot/KameletLocalBeanClassFourTest.java | 20 +-
.../springboot/KameletLocalBeanClassTest.java | 15 +-
.../springboot/KameletLocalBeanClassThreeTest.java | 20 +-
.../springboot/KameletLocalBeanClassTwoTest.java | 15 +-
.../springboot/KameletLocalBeanConfigureTest.java | 24 +-
.../KameletLocalBeanGroovyExternalTest.java | 26 +-
.../springboot/KameletLocalBeanGroovyTest.java | 16 +-
.../springboot/KameletLocalBeanIoCTest.java | 26 +-
.../KameletLocalBeanJoorExternalTest.java | 26 +-
.../springboot/KameletLocalBeanLanguageTest.java | 23 +-
.../springboot/KameletLocalBeanSupplierTest.java | 26 +-
.../kamelet/springboot/KameletLocalBeanTest.java | 23 +-
.../springboot/KameletLocalBeanTypeTest.java | 17 +-
.../kamelet/springboot/KameletLocationTest.java | 20 +-
.../springboot/KameletRecipientListTest.java | 17 +-
.../kamelet/springboot/KameletRouteDumpTest.java | 20 +-
.../kamelet/springboot/KameletRouteTest.java | 36 +-
.../kamelet/springboot/KameletToDTest.java | 18 +-
.../kamelet/springboot/KameletUoWIssueTest.java | 33 +-
.../kamelet/springboot/KameletValidationTest.java | 22 +-
.../kamelet/springboot/KameletWireTapTest.java | 18 +-
...ubernetesServiceDiscoveryAutoConfiguration.java | 8 +-
.../KubernetesClusterServiceAutoConfiguration.java | 39 +-
.../KubernetesClusterServiceConfiguration.java | 6 +-
...netesServiceDiscoveryAutoConfigurationTest.java | 139 ++--
...ernetesClusterServiceAutoConfigurationTest.java | 44 +-
.../springboot/LraServiceAutoConfiguration.java | 6 +-
.../MapstructMappingAutoConfiguration.java | 6 +-
.../master/springboot/EndpointUriEncodingTest.java | 8 +-
.../master/springboot/MasterComponentTest.java | 16 +-
.../MicrometerTagsAutoConfiguration.java | 155 ++--
.../metrics/CamelMetricsAutoConfiguration.java | 11 +-
.../metrics/CamelMetricsConfiguration.java | 36 +-
.../integration/AbstractMongoDbITSupport.java | 245 +++---
.../integration/MongoDbAggregateOperationIT.java | 35 +-
.../integration/MongoDbBigDecimalConverterIT.java | 14 +-
.../integration/MongoDbBulkWriteOperationIT.java | 66 +-
.../MongoDbChangeStreamsConsumerIT.java | 18 +-
.../integration/MongoDbConnectionBeansIT.java | 15 +-
.../mongodb/integration/MongoDbConversionsIT.java | 37 +-
.../MongoDbCredentialsFromUriConnectionIT.java | 81 +-
.../mongodb/integration/MongoDbDynamicityIT.java | 22 +-
.../integration/MongoDbExceptionHandlingIT.java | 16 +-
.../integration/MongoDbFindOperationIT.java | 736 +++++++++---------
.../integration/MongoDbHeaderHandlingIT.java | 215 +++---
.../mongodb/integration/MongoDbIndexIT.java | 270 ++++---
.../mongodb/integration/MongoDbInsertBatchIT.java | 91 ++-
.../mongodb/integration/MongoDbOperationsIT.java | 70 +-
.../mongodb/integration/MongoDbOutputTypeIT.java | 224 +++---
.../integration/MongoDbReadPreferenceOptionIT.java | 12 +-
.../integration/MongoDbSpringDslOperationsIT.java | 12 +-
.../mongodb/integration/MongoDbStopEndpointIT.java | 13 +-
.../MongoDbTailableCursorConsumerIT.java | 824 ++++++++++-----------
.../meta/integration/MongoDbMetaExtensionIT.java | 53 +-
.../idempotent/MongoDbIdempotentRepositoryIT.java | 9 +-
.../integration/MongoDbVerifierExtensionIT.java | 73 +-
.../NettyComponentConfigurationTest.java | 34 +-
.../starter/ObservationAutoConfiguration.java | 41 +-
.../ObservationConditionalAutoConfiguration.java | 4 +-
.../ObservationConfigurationProperties.java | 7 +-
.../openapi/OpenApiAutoConfiguration.java | 10 +-
.../springboot/openapi/OpenApiConfiguration.java | 4 +-
.../java/org/apache/camel/openapi/BookOrder.java | 28 +-
.../org/apache/camel/openapi/ComplexTypesTest.java | 233 +++---
.../java/org/apache/camel/openapi/DayResponse.java | 14 +-
.../org/apache/camel/openapi/DummyBookService.java | 18 +-
.../camel/openapi/DummyRestConsumerFactory.java | 37 +-
.../org/apache/camel/openapi/DummyUserService.java | 18 +-
.../java/org/apache/camel/openapi/LineItem.java | 28 +-
...estOpenApiModelApiSecurityRequirementsTest.java | 103 ++-
.../RestOpenApiReaderApiDocsOverrideTest.java | 120 ++-
.../openapi/RestOpenApiReaderApiDocsTest.java | 124 ++--
.../openapi/RestOpenApiReaderContextPathTest.java | 152 ++--
.../openapi/RestOpenApiReaderDayOfWeekTest.java | 133 ++--
...RestOpenApiReaderEnableVendorExtensionTest.java | 125 ++--
.../RestOpenApiReaderFileResponseModelTest.java | 107 ++-
.../RestOpenApiReaderModelApiSecurityTest.java | 189 +++--
.../RestOpenApiReaderModelBookOrderTest.java | 159 ++--
.../camel/openapi/RestOpenApiReaderModelTest.java | 154 ++--
.../RestOpenApiReaderOverrideHostApiDocsTest.java | 45 +-
.../RestOpenApiReaderPropertyPlaceholderTest.java | 69 +-
.../camel/openapi/RestOpenApiReaderTest.java | 142 ++--
.../openapi/RestOpenApiV2SecuritySchemesTest.java | 64 +-
.../openapi/RestOpenApiV3SecuritySchemesTest.java | 170 ++---
...pringRestOpenApiReaderModelApiSecurityTest.java | 89 +--
.../test/java/org/apache/camel/openapi/User.java | 40 +-
.../org/apache/camel/openapi/model/CustomData.java | 8 +-
.../openapi/model/GenericComplexRequestType.java | 50 +-
.../openapi/model/SampleComplexRequestType.java | 72 +-
.../openapi/model/SampleComplexResponseType.java | 70 +-
.../openapi/producer/DummyRestProducerFactory.java | 48 +-
.../camel/openapi/producer/RestOpenApiGetTest.java | 68 +-
.../producer/RestOpenApiGetUriParamTest.java | 68 +-
.../opentelemetry/starter/CamelOpenTelemetry.java | 2 +-
.../starter/OpenTelemetryAutoConfiguration.java | 2 +-
.../OpenTelemetryConditionalAutoConfiguration.java | 4 +-
.../OpenTelemetryConfigurationProperties.java | 7 +-
.../springboot/CamelRequestHandlerMapping.java | 11 +-
.../http/springboot/PlatformHttpMessage.java | 9 +-
.../SpringBootPlatformHttpAutoConfiguration.java | 7 +-
.../springboot/SpringBootPlatformHttpConsumer.java | 10 +-
.../platform/http/springboot/PlatformHttpBase.java | 24 +-
.../SpringBootPlatformHttpRestDSLTest.java | 49 +-
.../springboot/SpringBootPlatformHttpTest.java | 47 +-
.../quartz/springboot/BaseQuartzTest.java | 10 +-
.../springboot/DelegateEndpointQuartzTest.java | 29 +-
.../FileConsumerQuartzSchedulerRestartTest.java | 28 +-
.../FileConsumerQuartzSchedulerTest.java | 24 +-
.../component/quartz/springboot/FromFileBase.java | 15 +-
.../springboot/FromFileQuartzSchedulerTest.java | 31 +-
.../springboot/MultiplePoliciesOnRouteTest.java | 30 +-
.../springboot/QuartUnderscoreTimerNameTest.java | 25 +-
.../springboot/QuartzAddDynamicRouteTest.java | 25 +-
...uartzAddRoutesAfterCamelContextStartedTest.java | 21 +-
.../quartz/springboot/QuartzAutoStartTest.java | 23 +-
.../quartz/springboot/QuartzCronMappingTest.java | 27 +-
.../quartz/springboot/QuartzCronRoute2Test.java | 30 +-
.../springboot/QuartzCronRouteDurableJobTest.java | 23 +-
.../springboot/QuartzCronRouteFireNowTest.java | 30 +-
.../quartz/springboot/QuartzCronRouteTest.java | 29 +-
.../QuartzCronRouteWithSmallCacheTest.java | 32 +-
.../springboot/QuartzCronTriggerRouteTest.java | 25 +-
.../springboot/QuartzCustomCalendarFireTest.java | 24 +-
.../springboot/QuartzCustomCalendarNoFireTest.java | 23 +-
.../quartz/springboot/QuartzInterruptTest.java | 30 +-
.../springboot/QuartzJobRouteUnderscoreTest.java | 22 +-
.../quartz/springboot/QuartzManagementTest.java | 26 +-
.../springboot/QuartzManuallyTriggerJobTest.java | 27 +-
.../springboot/QuartzRepeatIntervalTest.java | 30 +-
.../springboot/QuartzRouteFireNowOnlyOnceTest.java | 28 +-
.../quartz/springboot/QuartzRouteFireNowTest.java | 30 +-
.../quartz/springboot/QuartzRouteRestartTest.java | 30 +-
.../quartz/springboot/QuartzRouteTest.java | 31 +-
.../quartz/springboot/QuartzSimpleRouteTest.java | 33 +-
.../springboot/QuartzStatefulJobRouteTest.java | 26 +-
.../quartz/springboot/QuartzStopRouteTest.java | 30 +-
.../quartz/springboot/QuartzSuspendRouteTest.java | 30 +-
.../springboot/QuartzTriggerParametersTest.java | 41 +-
.../RouteAutoStopFalseCronScheduledPolicyTest.java | 27 +-
.../SimpleScheduledCombinedRoutePolicyTest.java | 26 +-
.../quartz/springboot/StatefulQuartzRouteTest.java | 27 +-
.../ReactiveStreamsServiceAutoConfiguration.java | 2 +-
.../test/ReactiveStreamsAutoConfigurationTest.java | 17 +-
.../test/ReactiveStreamsDefaultEngineTest.java | 10 +-
.../test/ReactiveStreamsNamedEngineTest.java | 11 +-
.../test/ReactiveStreamsRegistryEngineTest.java | 7 +-
.../support/ReactiveStreamsServiceTestSupport.java | 8 +-
.../springboot/ResilienceAutoConfiguration.java | 3 +-
.../camel/model/rest/springboot/CamelRestTest.java | 51 +-
.../springboot/AbstractSalesforceTestBase.java | 5 +-
.../salesforce/springboot/RawPayloadTest.java | 113 ++-
.../springboot/SalesforceComponentTest.java | 9 +-
.../springboot/dto/generated/Account.java | 205 +++--
.../dto/generated/Account_IndustryEnum.java | 2 +-
.../salesforce/springboot/dto/generated/Asset.java | 2 +-
.../springboot/dto/generated/Contact.java | 185 +++--
.../springboot/dto/generated/Document.java | 79 +-
.../springboot/dto/generated/Line_Item__c.java | 52 +-
.../springboot/dto/generated/MSPTest.java | 4 +-
.../springboot/dto/generated/Merchandise__c.java | 57 +-
.../dto/generated/QueryRecordsLine_Item__c.java | 2 +-
.../springboot/dto/generated/RecordType.java | 52 +-
.../springboot/dto/generated/StringMSPTest.java | 4 +-
.../salesforce/springboot/dto/generated/Task.java | 4 +-
.../springboot/BeanWithXQueryInjectionTest.java | 25 +-
.../language/xquery/springboot/FromFileBase.java | 15 +-
.../SaxonLanguageExtensionFunctionsTest.java | 29 +-
.../xquery/springboot/SaxonXPathSplitTest.java | 39 +-
.../language/xquery/springboot/SaxonXPathTest.java | 37 +-
.../xquery/springboot/SoapPayloadBeanTest.java | 26 +-
.../XPathHeaderEnableSaxonJavaDslTest.java | 45 +-
.../XPathSplitChoicePerformanceTest.java | 62 +-
.../xquery/springboot/XQueryConcurrencyTest.java | 20 +-
.../xquery/springboot/XQueryFilterTest.java | 22 +-
.../springboot/XQueryFromFileExceptionTest.java | 39 +-
.../xquery/springboot/XQueryFromFileTest.java | 29 +-
...XQueryHeaderNameResultTypeAndNamespaceTest.java | 31 +-
.../xquery/springboot/XQueryHeaderNameTest.java | 58 +-
.../springboot/XQueryLanguageFromFileTest.java | 30 +-
.../springboot/XQueryPredicateFilterTest.java | 24 +-
.../springboot/XQueryPropogateHeadersTest.java | 44 +-
.../xquery/springboot/XQueryRecipientListTest.java | 30 +-
.../xquery/springboot/XQueryResourceTest.java | 25 +-
.../springboot/XQueryTransformIssueTest.java | 29 +-
.../xquery/springboot/XQueryTransformTest.java | 21 +-
.../xquery/springboot/XQueryTransformTextTest.java | 20 +-
.../springboot/XQueryURLBasedConcurrencyTest.java | 22 +-
.../xquery/springboot/XQueryWithExtensionTest.java | 30 +-
.../xquery/springboot/XQueryWithFlworTest.java | 21 +-
.../springboot/XQueryWithNamespacesFilterTest.java | 22 +-
.../ServletMappingAutoConfiguration.java | 6 +-
.../SlackComponentVerifierExtensionTest.java | 56 +-
.../slack/springboot/SlackProducerTest.java | 39 +-
.../springdoc/SpringdocAutoConfiguration.java | 89 ++-
.../springdoc/SpringdocConfiguration.java | 4 +-
.../org/apache/camel/component/sql/BaseSql.java | 9 +-
.../sql/SqlConsumerDynamicParameterTest.java | 13 +-
.../sql/SqlEndpointMisconfigureDataSourceTest.java | 52 +-
.../camel/component/sql/SqlGeneratedKeysTest.java | 19 +-
.../sql/SqlProducerExpressionParameterTest.java | 14 +-
.../camel/component/sql/SqlProducerInTest.java | 15 +-
.../component/sql/SqlProducerOutputHeaderTest.java | 14 +-
.../sql/SqlProducerOutputTypeStreamListTest.java | 20 +-
.../camel/component/sql/SqlProducerToDTest.java | 14 +-
.../sql/SqlProducerUpdateHeadersTest.java | 10 +-
.../sql/SqlProducerUseMessageBodyForSqlTest.java | 27 +-
.../component/sql/SqlTransactedRouteTest.java | 29 +-
.../JdbcAggregateRecoverDeadLetterChannelTest.java | 29 +-
.../JdbcAggregateSerializedHeadersTest.java | 27 +-
.../aggregation/JdbcAggregateStoreAsTextTest.java | 32 +-
.../CustomizedJdbcMessageIdRepositoryTest.java | 32 +-
.../JdbcCachedMessageIdRepositoryTest.java | 17 +-
.../idempotent/JdbcMessageIdRepositoryTest.java | 15 +-
...dbcOrphanLockAwareIdempotentRepositoryTest.java | 7 +-
.../dataformat/swift/mt/SwiftMtDataFormatTest.java | 16 +-
.../dataformat/swift/mx/SwiftMxDataFormatTest.java | 37 +-
.../telegram/springboot/TelegramChatBotTest.java | 45 +-
.../TelegramComponentParametersTest.java | 11 +-
.../springboot/TelegramConfigurationTest.java | 24 +-
.../TelegramConsumerChannelPostTest.java | 31 +-
.../TelegramConsumerEmptyResponseTest.java | 26 +-
.../TelegramConsumerFallbackConversionTest.java | 40 +-
...nsumerHealthCheckErrorDisabledConsumerTest.java | 36 +-
.../TelegramConsumerHealthCheckErrorTest.java | 50 +-
.../TelegramConsumerHealthCheckOkTest.java | 41 +-
.../TelegramConsumerIncomingInlineQueryTest.java | 33 +-
.../springboot/TelegramConsumerMappingTest.java | 32 +-
.../TelegramConsumerMediaDocumentTest.java | 30 +-
.../springboot/TelegramConsumerMediaGameTest.java | 33 +-
.../springboot/TelegramConsumerMediaPhotoTest.java | 30 +-
.../TelegramConsumerMediaStickerTest.java | 31 +-
.../springboot/TelegramConsumerMediaVideoTest.java | 30 +-
.../springboot/TelegramConsumerMultipleTest.java | 33 +-
.../TelegramConsumerServiceErrorTest.java | 34 +-
.../springboot/TelegramConsumerSingleTest.java | 31 +-
.../telegram/springboot/TelegramMockRoutes.java | 14 +-
.../TelegramProducerChatIdResolutionTest.java | 29 +-
.../springboot/TelegramProducerLocationTest.java | 72 +-
.../springboot/TelegramProducerMediaTest.java | 76 +-
.../telegram/springboot/TelegramTestSupport.java | 48 +-
.../telegram/springboot/TelegramTestUtil.java | 14 +-
.../springboot/TelegramWebhookCallTest.java | 38 +-
.../boot/UndertowSpringSecurityCustomizer.java | 20 +-
.../providers/KeycloakProviderConfiguration.java | 13 +-
.../camel/component/undertow/UndertowSSLTest.java | 18 +-
.../component/validator/ContextTestSupport.java | 213 +++---
.../validator/CustomSchemaFactoryFeatureTest.java | 50 +-
.../validator/FileValidatorRouteTest.java | 27 +-
.../component/validator/ValidatorBeanCallTest.java | 14 +-
.../validator/ValidatorDtdAccessAbstractTest.java | 17 +-
.../validator/ValidatorDtdAccessOffTest.java | 9 +-
.../validator/ValidatorDtdAccessOnTest.java | 9 +-
.../ValidatorEndpointClearCachedSchemaTest.java | 13 +-
.../validator/ValidatorIllegalImportTest.java | 32 +-
.../ValidatorIncludeEncodingRouteTest.java | 14 +-
.../ValidatorIncludeRelativeRouteTest.java | 23 +-
.../validator/ValidatorIncludeRouteTest.java | 39 +-
.../validator/ValidatorLazyStartProducerTest.java | 10 +-
.../ValidatorResourceResolverFactoryTest.java | 66 +-
.../component/validator/ValidatorRootPathTest.java | 14 +-
.../component/validator/ValidatorRouteTest.java | 23 +-
.../ValidatorWithResourceResolverRouteTest.java | 22 +-
.../validation/CatalogLSResourceResolver.java | 292 ++++----
.../org/apache/camel/urlhandler/pd/Handler.java | 76 +-
.../vertx/http/springboot/VertxHttpSSLTest.java | 35 +-
.../springboot/VertxWebsocketSSLGlobalTest.java | 21 +-
.../http/springboot/VertxWebsocketSSLTest.java | 38 +-
.../webhook/springboot/TestComponent.java | 3 +-
.../webhook/springboot/WebhookBasePathTest.java | 41 +-
.../webhook/springboot/WebhookHttpBindingTest.java | 43 +-
.../webhook/springboot/WebhookMultiRouteTest.java | 44 +-
.../webhook/springboot/WebhookPathTest.java | 25 +-
.../webhook/springboot/WebhookUriEncodingTest.java | 27 +-
.../xml/jaxb/springboot/JAXBRuntimeHints.java | 76 +-
.../jaxb/springboot/graalvm/JAXBSubstitutions.java | 9 +-
.../camel/xml/jaxb/springboot/BeanScope.java | 4 +-
.../camel/xml/jaxb/springboot/IdentifiedType.java | 8 +-
.../xml/jaxb/springboot/JAXBRuntimeHintsTest.java | 12 +-
.../camel/xml/jaxb/springboot/USAddress.java | 50 +-
.../AggregationStrategyWithFilenameHeaderTest.java | 31 +-
.../AggregationStrategyWithPreservationTest.java | 36 +-
.../ZipAggregationStrategyEmptyFileTest.java | 32 +-
.../springboot/ZipAggregationStrategyTest.java | 37 +-
.../zipfile/springboot/ZipFileDataFormatTest.java | 80 +-
.../springboot/ZipFileIteratorDataFormatTest.java | 40 +-
.../ZipFileMultipleFilesSplitterTest.java | 56 +-
.../springboot/ZipFileSplitAndDeleteTest.java | 43 +-
.../ZipFileSplitIteratorCorruptTest.java | 38 +-
.../springboot/ZipFileSplitOneFileTest.java | 37 +-
.../springboot/ZipSplitterRouteIssueTest.java | 37 +-
.../zipfile/springboot/ZipSplitterRouteTest.java | 36 +-
.../src/main/docs/zookeeper.json | 4 +-
.../ZooKeeperServiceRegistryAutoConfiguration.java | 3 +-
.../ZooKeeperServiceRegistryConfiguration.java | 43 +-
.../ZooKeeperClusterServiceAutoConfiguration.java | 51 +-
.../ZooKeeperClusterServiceConfiguration.java | 35 +-
.../cloud/ZooKeeperServiceRegistryTest.java | 55 +-
.../cluster/ZooKeeperClusterServiceTest.java | 26 +-
.../spring/boot/k/ApplicationConfiguration.java | 8 +-
.../k/ApplicationEnvironmentPostProcessor.java | 45 +-
.../boot/k/ApplicationRoutesAutoConfiguration.java | 4 +-
.../spring/boot/k/ApplicationRoutesCustomizer.java | 11 +-
.../k/ApplicationShutdownAutoConfiguration.java | 7 +-
.../boot/k/ApplicationShutdownCustomizer.java | 31 +-
.../spring/boot/k/ApplicationPropertiesTest.java | 29 +-
.../camel/spring/boot/k/ApplicationRoutesTest.java | 41 +-
.../spring/boot/k/ApplicationShutdownTest.java | 28 +-
.../xml/SpringBootXmlCamelContextConfigurer.java | 6 +-
.../boot/xml/CamelNonInvasiveCamelContextTest.java | 3 +-
.../boot/xml/MixedBootAndXmlConfigurationTest.java | 9 +-
.../spring/boot/xml/MixedJavaDslAndXmlTest.java | 5 +-
.../camel/spring/boot/xml/MixedRestDslTest.java | 17 +-
.../camel/spring/boot/CamelAutoConfiguration.java | 101 +--
.../spring/boot/CamelContextConfiguration.java | 8 +-
.../boot/CamelSpringBootApplicationController.java | 3 +-
.../boot/CamelSpringBootApplicationListener.java | 101 ++-
.../boot/FatJarPackageScanClassResolver.java | 13 +-
.../boot/FatJarPackageScanResourceResolver.java | 17 +-
.../camel/spring/boot/SpringBootCamelContext.java | 7 +-
.../camel/spring/boot/SpringPropertiesParser.java | 3 +-
.../camel/spring/boot/SpringTypeConverter.java | 4 +-
.../console/CamelDevConsoleAutoConfiguration.java | 1 -
.../endpoint/CamelRouteControllerEndpoint.java | 4 +-
.../boot/actuate/endpoint/CamelRoutesEndpoint.java | 83 +--
.../endpoint/CamelRoutesEndpointProperties.java | 6 +-
.../AsyncHealthIndicatorAutoConfiguration.java | 187 +++--
.../CamelAvailabilityCheckAutoConfiguration.java | 24 +-
.../health/CamelHealthCheckAutoConfiguration.java | 27 +-
.../CamelHealthCheckConfigurationProperties.java | 3 -
.../actuate/health/CamelHealthCheckIndicator.java | 3 +-
.../boot/actuate/health/CamelHealthHelper.java | 9 +-
.../boot/actuate/health/CamelProbesHelper.java | 31 +-
.../CamelLivenessStateHealthIndicator.java | 27 +-
.../CamelReadinessStateHealthIndicator.java | 27 +-
.../actuate/info/CamelInfoAutoConfiguration.java | 4 +-
.../camel/spring/boot/aot/CamelRuntimeHints.java | 16 +-
.../camel/spring/boot/aot/ReflectionHelper.java | 91 ++-
.../camel/spring/boot/aot/RuntimeHintsHelper.java | 27 +-
.../cloud/CamelCloudConfigurationProperties.java | 3 +-
...dServiceCallConfigurationAutoConfiguration.java | 7 +-
.../CamelCloudServiceChooserAutoConfiguration.java | 5 +-
...amelCloudServiceDiscoveryAutoConfiguration.java | 40 +-
.../CamelCloudServiceFilterAutoConfiguration.java | 27 +-
.../ClusteredRouteControllerAutoConfiguration.java | 22 +-
.../ClusteredRouteControllerConfiguration.java | 11 +-
.../spring/boot/cluster/TimePatternConverter.java | 30 +-
.../boot/debug/CamelDebugAutoConfiguration.java | 3 +-
.../PropertiesComponentAutoConfiguration.java | 16 +-
.../PropertiesComponentConfiguration.java | 48 +-
.../SupervisingRouteControllerConfiguration.java | 51 +-
.../CamelRouteTemplateAutoConfiguration.java | 6 +-
.../CamelRouteTemplateConfigurationProperties.java | 2 -
.../boot/security/CamelSSLAutoConfiguration.java | 35 +-
.../security/CamelSSLConfigurationProperties.java | 41 +-
.../CamelThreadPoolAutoConfiguration.java | 22 +-
.../CamelThreadPoolConfigurationProperties.java | 5 +-
.../boot/trace/CamelTraceAutoConfiguration.java | 3 +-
.../spring/boot/util/CamelPropertiesHelper.java | 83 ++-
.../camel/spring/boot/util/GroupCondition.java | 7 +-
.../spring/boot/util/HierarchicalCondition.java | 9 +-
.../boot/util/HierarchicalPropertiesEvaluator.java | 21 +-
.../util/OnHierarchicalPropertiesCondition.java | 11 +-
.../vault/AwsVaultConfigurationProperties.java | 1 +
.../vault/AzureVaultConfigurationProperties.java | 7 +-
.../vault/GcpVaultConfigurationProperties.java | 52 +-
.../camel/spring/boot/CamelAnnotationsTest.java | 7 +-
.../spring/boot/CamelAutoConfigurationTest.java | 17 +-
...CamelAutoConfigurationWithCompatPrefixTest.java | 6 +-
.../CamelAutoConfigurationWithMainPrefixTest.java | 6 +-
.../boot/CamelConfigurationLocationsTest.java | 3 +-
...urationPostConstructAddRouteToRegistryTest.java | 9 +-
.../spring/boot/CamelLambdaRouteBuilderTest.java | 6 +-
.../spring/boot/CamelSpringBootShutdownTest.java | 23 +-
.../camel/spring/boot/CamelXmlRoutesTest.java | 9 +-
.../boot/CustomCamelCamelConfigurationTest.java | 3 +-
.../spring/boot/CustomShutdownStrategyTest.java | 7 +-
.../camel/spring/boot/GlobalOptionsTest.java | 20 +-
.../spring/boot/LogListenerDiscoveryTest.java | 7 +-
.../apache/camel/spring/boot/NoConvertersTest.java | 3 +-
.../camel/spring/boot/SpringTypeConverterTest.java | 7 +-
.../spring/boot/StartupShutdownOrderTest.java | 2 +-
.../SupervisingRouteControllerRestartTest.java | 32 +-
.../boot/SupervisingRouteControllerTest.java | 33 +-
.../spring/boot/ThreadPoolConfigurationTest.java | 29 +-
.../spring/boot/UuidGeneratorDiscoveryTest.java | 7 +-
.../spring/boot/XPathPropertyPlaceholderTest.java | 29 +-
.../CamelEndpointsGloballyEnabledTest.java | 8 +-
.../CamelRouteControllerEndpointEnabledTest.java | 6 +-
...erEndpointGloballyDisabledAndReenabledTest.java | 11 +-
.../endpoint/CamelRouteControllerEndpointTest.java | 8 +-
.../endpoint/CamelRoutesEndpointEnabledTest.java | 8 +-
.../CamelRoutesEndpointReadOnlyOperationTest.java | 10 +-
.../actuate/endpoint/CamelRoutesEndpointTest.java | 4 +-
.../CamelRoutesEndpointWriteOperationTest.java | 10 +-
.../boot/actuate/health/CamelHealthTest.java | 5 +-
.../boot/actuate/health/CamelProbesTest.java | 78 +-
.../spring/boot/actuate/health/ProbesRoute.java | 12 +-
.../spring/boot/actuate/info/CamelInfoTest.java | 2 +-
.../spring/boot/aot/CamelRuntimeHintsTest.java | 12 +-
.../spring/boot/aot/ReflectionHelperTest.java | 12 +-
.../CamelCloudServiceCallConfigurationTest.java | 114 ++-
...melCloudServiceCallGlobalConfigurationTest.java | 50 +-
.../CamelCloudServiceCallRefExpressionTest.java | 49 +-
.../CamelCloudServiceCallSimpleExpressionTest.java | 50 +-
.../boot/cloud/CamelCloudServiceCallTest.java | 56 +-
.../spring/boot/cloud/SpringBootPropertyUtil.java | 5 +-
.../spring/boot/issues/OverridePropertiesTest.java | 8 +-
.../camel/spring/boot/issues/RestDslPostTest.java | 8 +-
.../spring/boot/issues/StreamCachingTest.java | 10 +-
.../camel/spring/boot/mockendpoints/MyRoute.java | 3 +-
.../boot/parent/SpringBootRefreshContextTest.java | 5 +-
.../camel/spring/boot/routefilter/BarRoute.java | 3 +-
.../camel/spring/boot/routefilter/BarTest.java | 2 +-
.../camel/spring/boot/routefilter/DrinkRoute.java | 3 +-
.../routefilter/FooExcludeRouteAnnotationTest.java | 2 +-
.../camel/spring/boot/routefilter/FooRoute.java | 3 +-
.../camel/spring/boot/routefilter/FooTest.java | 4 +-
.../security/CamelSSLAutoConfigurationTest.java | 147 ++--
.../spring/boot/security/CamelSSLNoConfigTest.java | 14 +-
.../boot/util/CamelPropertiesHelperTest.java | 6 +-
.../spring/boot/util/GroupCondition1Test.java | 11 +-
.../spring/boot/util/GroupCondition2Test.java | 11 +-
.../spring/boot/util/GroupCondition3Test.java | 11 +-
.../spring/boot/util/GroupCondition4Test.java | 11 +-
.../util/HierarchicalPropertiesEvaluatorTest.java | 33 +-
.../boot/vault/AwsVaultConfigurationTest.java | 20 +-
.../boot/vault/AzureVaultConfigurationTest.java | 18 +-
.../boot/vault/GcpVaultConfigurationTest.java | 16 +-
.../vault/HashicorpVaultConfigurationTest.java | 15 +-
.../connector/CliConnectorAutoConfiguration.java | 7 +-
.../cli/connector/SpringLocalCliConnector.java | 3 +-
.../endpointdsl/EndpointDslAutoConfiguration.java | 3 +-
.../endpointdsl/EndpointDslRouteCollector.java | 7 +-
.../camel/itest/springboot/ITestApplication.java | 6 +-
.../apache/camel/itest/springboot/ITestConfig.java | 44 +-
.../camel/itest/springboot/ITestConfigBuilder.java | 12 +-
.../springboot/command/AbstractTestCommand.java | 4 +-
.../itest/springboot/command/UnitTestCommand.java | 350 ++++-----
.../itest/springboot/command/UnitTestResult.java | 8 +-
.../itest/springboot/util/SerializationUtils.java | 9 +-
.../myconverter/StaticDummyFallbackConverter.java | 4 +-
.../springboot/AbstractSpringBootTestSupport.java | 2 +-
.../camel/itest/springboot/CamelActivemqTest.java | 6 +-
.../camel/itest/springboot/CamelAmqpTest.java | 6 +-
.../camel/itest/springboot/CamelArangodbTest.java | 8 +-
.../camel/itest/springboot/CamelAs2Test.java | 4 +-
.../camel/itest/springboot/CamelAsn1Test.java | 6 +-
.../camel/itest/springboot/CamelAsteriskTest.java | 6 +-
.../springboot/CamelAtmosphereWebsocketTest.java | 6 +-
.../camel/itest/springboot/CamelAtomTest.java | 6 +-
.../camel/itest/springboot/CamelAvroRpcTest.java | 11 +-
.../camel/itest/springboot/CamelAvroTest.java | 10 +-
.../itest/springboot/CamelAws2AthenaTest.java | 6 +-
.../camel/itest/springboot/CamelAws2CwTest.java | 6 +-
.../camel/itest/springboot/CamelAws2DdbTest.java | 6 +-
.../camel/itest/springboot/CamelAws2Ec2Test.java | 6 +-
.../camel/itest/springboot/CamelAws2EcsTest.java | 6 +-
.../camel/itest/springboot/CamelAws2EksTest.java | 6 +-
.../itest/springboot/CamelAws2EventbridgeTest.java | 6 +-
.../camel/itest/springboot/CamelAws2IamTest.java | 6 +-
.../itest/springboot/CamelAws2KinesisTest.java | 6 +-
.../camel/itest/springboot/CamelAws2KmsTest.java | 6 +-
.../itest/springboot/CamelAws2LambdaTest.java | 6 +-
.../camel/itest/springboot/CamelAws2MqTest.java | 6 +-
.../camel/itest/springboot/CamelAws2MskTest.java | 6 +-
.../camel/itest/springboot/CamelAws2S3Test.java | 6 +-
.../camel/itest/springboot/CamelAws2SesTest.java | 6 +-
.../camel/itest/springboot/CamelAws2SnsTest.java | 6 +-
.../camel/itest/springboot/CamelAws2SqsTest.java | 6 +-
.../camel/itest/springboot/CamelAws2StsTest.java | 6 +-
.../itest/springboot/CamelAws2TranslateTest.java | 6 +-
.../itest/springboot/CamelAwsBedrockTest.java | 8 +-
.../itest/springboot/CamelAwsCloudtrailTest.java | 6 +-
.../camel/itest/springboot/CamelAwsConfigTest.java | 6 +-
.../springboot/CamelAwsSecretsManagerTest.java | 6 +-
.../itest/springboot/CamelAzureCosmosdbTest.java | 5 +-
.../itest/springboot/CamelAzureEventhubsTest.java | 6 +-
.../itest/springboot/CamelAzureFilesTest.java | 5 +-
.../itest/springboot/CamelAzureKeyVaultTest.java | 5 +-
.../itest/springboot/CamelAzureServicebusTest.java | 5 +-
.../springboot/CamelAzureStorageBlobTest.java | 6 +-
.../springboot/CamelAzureStorageDatalakeTest.java | 5 +-
.../springboot/CamelAzureStorageQueueTest.java | 6 +-
.../camel/itest/springboot/CamelBarcodeTest.java | 6 +-
.../camel/itest/springboot/CamelBase64Test.java | 6 +-
.../itest/springboot/CamelBeanValidatorTest.java | 6 +-
.../camel/itest/springboot/CamelBindyTest.java | 6 +-
.../camel/itest/springboot/CamelBonitaTest.java | 6 +-
.../camel/itest/springboot/CamelBoxTest.java | 10 +-
.../camel/itest/springboot/CamelBraintreeTest.java | 9 +-
.../camel/itest/springboot/CamelCaffeineTest.java | 6 +-
.../itest/springboot/CamelCassandraqlTest.java | 6 +-
.../camel/itest/springboot/CamelCborTest.java | 6 +-
.../itest/springboot/CamelChatscriptTest.java | 6 +-
.../camel/itest/springboot/CamelChunkTest.java | 6 +-
.../camel/itest/springboot/CamelCmSmsTest.java | 6 +-
.../camel/itest/springboot/CamelCoapTest.java | 6 +-
.../camel/itest/springboot/CamelCometdTest.java | 6 +-
.../camel/itest/springboot/CamelConsulTest.java | 6 +-
.../camel/itest/springboot/CamelCouchdbTest.java | 6 +-
.../camel/itest/springboot/CamelCronTest.java | 6 +-
.../camel/itest/springboot/CamelCryptoTest.java | 5 +-
.../camel/itest/springboot/CamelCsvTest.java | 6 +-
.../camel/itest/springboot/CamelCxfRestTest.java | 5 +-
.../camel/itest/springboot/CamelCxfSoapTest.java | 5 +-
.../itest/springboot/CamelCxfTransportTest.java | 6 +-
.../itest/springboot/CamelDebeziumMongodbTest.java | 4 +-
.../itest/springboot/CamelDebeziumMysqlTest.java | 5 +-
.../springboot/CamelDebeziumPostgresTest.java | 5 +-
.../springboot/CamelDebeziumSqlserverTest.java | 5 +-
.../itest/springboot/CamelDigitaloceanTest.java | 6 +-
.../camel/itest/springboot/CamelDisruptorTest.java | 5 +-
.../camel/itest/springboot/CamelDjlTest.java | 6 +-
.../camel/itest/springboot/CamelDnsTest.java | 6 +-
.../camel/itest/springboot/CamelDockerTest.java | 6 +-
.../camel/itest/springboot/CamelDrillTest.java | 6 +-
.../camel/itest/springboot/CamelDropboxTest.java | 6 +-
.../camel/itest/springboot/CamelEhcacheTest.java | 6 +-
.../springboot/CamelElasticsearchRestTest.java | 7 +-
.../itest/springboot/CamelElasticsearchTest.java | 7 +-
.../camel/itest/springboot/CamelEtcd3Test.java | 6 +-
.../camel/itest/springboot/CamelExecTest.java | 7 +-
.../camel/itest/springboot/CamelFastjsonTest.java | 6 +-
.../camel/itest/springboot/CamelFhirTest.java | 6 +-
.../camel/itest/springboot/CamelFileWatchTest.java | 6 +-
.../camel/itest/springboot/CamelFlatpackTest.java | 6 +-
.../camel/itest/springboot/CamelFlinkTest.java | 6 +-
.../camel/itest/springboot/CamelFopTest.java | 6 +-
.../itest/springboot/CamelFreemarkerTest.java | 6 +-
.../camel/itest/springboot/CamelFtpTest.java | 5 +-
.../camel/itest/springboot/CamelGeocoderTest.java | 6 +-
.../camel/itest/springboot/CamelGitTest.java | 6 +-
.../camel/itest/springboot/CamelGithubTest.java | 6 +-
.../itest/springboot/CamelGoogleBigqueryTest.java | 5 +-
.../itest/springboot/CamelGoogleCalendarTest.java | 6 +-
.../itest/springboot/CamelGoogleDriveTest.java | 6 +-
.../itest/springboot/CamelGoogleFunctionsTest.java | 5 +-
.../itest/springboot/CamelGoogleMailTest.java | 6 +-
.../itest/springboot/CamelGooglePubsubTest.java | 23 +-
.../springboot/CamelGoogleSecretManagerTest.java | 6 +-
.../itest/springboot/CamelGoogleSheetsTest.java | 6 +-
.../itest/springboot/CamelGoogleStorageTest.java | 5 +-
.../camel/itest/springboot/CamelGrapeTest.java | 6 +-
.../camel/itest/springboot/CamelGraphqlTest.java | 6 +-
.../camel/itest/springboot/CamelGrokTest.java | 6 +-
.../camel/itest/springboot/CamelGroovyTest.java | 6 +-
.../camel/itest/springboot/CamelGrpcTest.java | 6 +-
.../camel/itest/springboot/CamelGsonTest.java | 6 +-
.../itest/springboot/CamelGuavaEventbusTest.java | 6 +-
.../itest/springboot/CamelHashicorpVaultTest.java | 5 +-
.../camel/itest/springboot/CamelHazelcastTest.java | 8 +-
.../camel/itest/springboot/CamelHl7Test.java | 6 +-
.../camel/itest/springboot/CamelHttpTest.java | 6 +-
.../itest/springboot/CamelHuaweicloudSmnTest.java | 5 +-
.../camel/itest/springboot/CamelIcalTest.java | 6 +-
.../camel/itest/springboot/CamelIec60870Test.java | 6 +-
.../camel/itest/springboot/CamelIgniteTest.java | 8 +-
.../itest/springboot/CamelInfinispanTest.java | 8 +-
.../camel/itest/springboot/CamelInfluxdbTest.java | 8 +-
.../camel/itest/springboot/CamelIotaTest.java | 6 +-
.../camel/itest/springboot/CamelIrcTest.java | 6 +-
.../camel/itest/springboot/CamelIronmqTest.java | 6 +-
.../camel/itest/springboot/CamelJacksonTest.java | 6 +-
.../itest/springboot/CamelJacksonxmlTest.java | 6 +-
.../camel/itest/springboot/CamelJasyptTest.java | 11 +-
.../camel/itest/springboot/CamelJaxbTest.java | 6 +-
.../camel/itest/springboot/CamelJcacheTest.java | 6 +-
.../camel/itest/springboot/CamelJcrTest.java | 7 +-
.../camel/itest/springboot/CamelJdbcTest.java | 6 +-
.../camel/itest/springboot/CamelJettyTest.java | 7 +-
.../itest/springboot/CamelJgroupsRaftTest.java | 6 +-
.../camel/itest/springboot/CamelJgroupsTest.java | 6 +-
.../camel/itest/springboot/CamelJiraTest.java | 6 +-
.../camel/itest/springboot/CamelJmsTest.java | 7 +-
.../camel/itest/springboot/CamelJmxTest.java | 6 +-
.../camel/itest/springboot/CamelJoltTest.java | 6 +-
.../camel/itest/springboot/CamelJooqTest.java | 6 +-
.../camel/itest/springboot/CamelJpaTest.java | 5 +-
.../camel/itest/springboot/CamelJschTest.java | 6 +-
.../camel/itest/springboot/CamelJsltTest.java | 6 +-
.../camel/itest/springboot/CamelJsonPatchTest.java | 6 +-
.../itest/springboot/CamelJsonValidatorTest.java | 6 +-
.../camel/itest/springboot/CamelJsonapiTest.java | 6 +-
.../camel/itest/springboot/CamelJsonataTest.java | 6 +-
.../camel/itest/springboot/CamelJsonpathTest.java | 6 +-
.../camel/itest/springboot/CamelJt400Test.java | 6 +-
.../camel/itest/springboot/CamelKafkaTest.java | 8 +-
.../itest/springboot/CamelKubernetesTest.java | 7 +-
.../camel/itest/springboot/CamelKuduTest.java | 9 +-
.../camel/itest/springboot/CamelLdapTest.java | 6 +-
.../camel/itest/springboot/CamelLdifTest.java | 6 +-
.../camel/itest/springboot/CamelLeveldbTest.java | 6 +-
.../camel/itest/springboot/CamelLuceneTest.java | 6 +-
.../itest/springboot/CamelLumberjackTest.java | 6 +-
.../camel/itest/springboot/CamelLzfTest.java | 6 +-
.../camel/itest/springboot/CamelMailTest.java | 6 +-
.../camel/itest/springboot/CamelMetricsTest.java | 6 +-
.../itest/springboot/CamelMicrometerTest.java | 6 +-
.../camel/itest/springboot/CamelMilvusTest.java | 5 +-
.../camel/itest/springboot/CamelMinaTest.java | 8 +-
.../camel/itest/springboot/CamelMinioTest.java | 6 +-
.../camel/itest/springboot/CamelMllpTest.java | 8 +-
.../itest/springboot/CamelMongodbGridfsTest.java | 9 +-
.../camel/itest/springboot/CamelMongodbTest.java | 9 +-
.../camel/itest/springboot/CamelMustacheTest.java | 6 +-
.../camel/itest/springboot/CamelMvelTest.java | 6 +-
.../camel/itest/springboot/CamelMybatisTest.java | 8 +-
.../camel/itest/springboot/CamelNatsTest.java | 7 +-
.../camel/itest/springboot/CamelNettyHttpTest.java | 10 +-
.../camel/itest/springboot/CamelNettyTest.java | 8 +-
.../camel/itest/springboot/CamelNitriteTest.java | 8 +-
.../camel/itest/springboot/CamelOgnlTest.java | 6 +-
.../camel/itest/springboot/CamelOlingo2Test.java | 9 +-
.../camel/itest/springboot/CamelOlingo4Test.java | 9 +-
.../itest/springboot/CamelOpenapiJavaTest.java | 6 +-
.../itest/springboot/CamelOpensearchTest.java | 5 +-
.../camel/itest/springboot/CamelOpenstackTest.java | 6 +-
.../itest/springboot/CamelOpentelemetryTest.java | 18 +-
.../camel/itest/springboot/CamelPahoTest.java | 6 +-
.../itest/springboot/CamelParquetAvroTest.java | 6 +-
.../camel/itest/springboot/CamelPdfTest.java | 6 +-
.../springboot/CamelPgReplicationSlotTest.java | 8 +-
.../camel/itest/springboot/CamelPgeventTest.java | 6 +-
.../camel/itest/springboot/CamelPlc4xTest.java | 6 +-
.../camel/itest/springboot/CamelPrinterTest.java | 6 +-
.../camel/itest/springboot/CamelProtobufTest.java | 6 +-
.../camel/itest/springboot/CamelPubnubTest.java | 6 +-
.../camel/itest/springboot/CamelPulsarTest.java | 6 +-
.../camel/itest/springboot/CamelQuartzTest.java | 8 +-
.../camel/itest/springboot/CamelQuickfixTest.java | 6 +-
.../itest/springboot/CamelReactiveStreamsTest.java | 8 +-
.../camel/itest/springboot/CamelReactorTest.java | 8 +-
.../itest/springboot/CamelResilience4jTest.java | 5 +-
.../itest/springboot/CamelRestOpenapiTest.java | 6 +-
.../itest/springboot/CamelRobotframeworkTest.java | 6 +-
.../camel/itest/springboot/CamelRssTest.java | 6 +-
.../itest/springboot/CamelSalesforceTest.java | 9 +-
.../itest/springboot/CamelSapNetweaverTest.java | 8 +-
.../camel/itest/springboot/CamelSaxonTest.java | 6 +-
.../itest/springboot/CamelSchematronTest.java | 6 +-
.../itest/springboot/CamelServicenowTest.java | 8 +-
.../camel/itest/springboot/CamelServletTest.java | 12 +-
.../camel/itest/springboot/CamelShiroTest.java | 6 +-
.../camel/itest/springboot/CamelSjms2Test.java | 7 +-
.../camel/itest/springboot/CamelSjmsTest.java | 18 +-
.../camel/itest/springboot/CamelSlackTest.java | 9 +-
.../camel/itest/springboot/CamelSmbTest.java | 6 +-
.../camel/itest/springboot/CamelSmppTest.java | 6 +-
.../camel/itest/springboot/CamelSnakeyamlTest.java | 5 +-
.../camel/itest/springboot/CamelSnmpTest.java | 6 +-
.../camel/itest/springboot/CamelSoapTest.java | 6 +-
.../camel/itest/springboot/CamelSplunkTest.java | 6 +-
.../itest/springboot/CamelSpringBatchTest.java | 6 +-
.../springboot/CamelSpringIntegrationTest.java | 6 +-
.../itest/springboot/CamelSpringLdapTest.java | 6 +-
.../itest/springboot/CamelSpringRedisTest.java | 7 +-
.../itest/springboot/CamelSpringSecurityTest.java | 6 +-
.../camel/itest/springboot/CamelSpringTest.java | 7 +-
.../camel/itest/springboot/CamelSpringWsTest.java | 9 +-
.../camel/itest/springboot/CamelSqlTest.java | 6 +-
.../camel/itest/springboot/CamelSshTest.java | 6 +-
.../camel/itest/springboot/CamelStaxTest.java | 6 +-
.../camel/itest/springboot/CamelStitchTest.java | 5 +-
.../camel/itest/springboot/CamelStompTest.java | 6 +-
.../camel/itest/springboot/CamelStreamTest.java | 6 +-
.../itest/springboot/CamelStringtemplateTest.java | 6 +-
.../camel/itest/springboot/CamelSwiftTest.java | 6 +-
.../camel/itest/springboot/CamelSyslogTest.java | 6 +-
.../camel/itest/springboot/CamelTarfileTest.java | 6 +-
.../camel/itest/springboot/CamelTelegramTest.java | 5 +-
.../camel/itest/springboot/CamelThriftTest.java | 6 +-
.../camel/itest/springboot/CamelThymeleafTest.java | 6 +-
.../camel/itest/springboot/CamelTikaTest.java | 5 +-
.../camel/itest/springboot/CamelTwilioTest.java | 7 +-
.../camel/itest/springboot/CamelTwitterTest.java | 8 +-
.../camel/itest/springboot/CamelUndertowTest.java | 13 +-
.../springboot/CamelUnivocityParsersTest.java | 6 +-
.../camel/itest/springboot/CamelVelocityTest.java | 6 +-
.../camel/itest/springboot/CamelVertxHttpTest.java | 6 +-
.../camel/itest/springboot/CamelVertxTest.java | 6 +-
.../itest/springboot/CamelVertxWebsocketTest.java | 6 +-
.../camel/itest/springboot/CamelWeatherTest.java | 7 +-
.../camel/itest/springboot/CamelWeb3jTest.java | 6 +-
.../camel/itest/springboot/CamelWebhookTest.java | 6 +-
.../camel/itest/springboot/CamelWordpressTest.java | 6 +-
.../camel/itest/springboot/CamelWorkdayTest.java | 5 +-
.../camel/itest/springboot/CamelXchangeTest.java | 6 +-
.../apache/camel/itest/springboot/CamelXjTest.java | 5 +-
.../itest/springboot/CamelXmlsecurityTest.java | 5 +-
.../camel/itest/springboot/CamelXmppTest.java | 7 +-
.../camel/itest/springboot/CamelXsltSaxonTest.java | 5 +-
.../camel/itest/springboot/CamelZendeskTest.java | 5 +-
.../camel/itest/springboot/CamelZipfileTest.java | 5 +-
.../itest/springboot/CamelZookeeperMasterTest.java | 6 +-
.../camel/itest/springboot/CamelZookeeperTest.java | 6 +-
.../arquillian/ArquillianSyncBootJarLauncher.java | 16 +-
.../arquillian/SpringBootZipExporterDelegate.java | 5 +-
.../arquillian/SpringBootZipExporterImpl.java | 7 +-
.../SpringBootZipOnDemandInputStream.java | 12 +-
.../container/ManagedSEDeployableContainer.java | 25 +-
.../arquillian/container/SEContainerAppender.java | 6 +-
.../container/jmx/TestDeploymentPackager.java | 3 +-
.../arquillian/container/util/Await.java | 6 +-
.../container/util/FileDeploymentUtils.java | 15 +-
.../itest/springboot/util/ArquillianPackager.java | 71 +-
.../camel/itest/springboot/util/BOMResolver.java | 64 +-
.../itest/springboot/util/DependencyResolver.java | 5 +-
.../camel/itest/springboot/util/JarExporter.java | 6 +-
.../maven/SpringBootConfigGeneratorMojo.java | 13 +-
.../maven/AbstractSpringBootGenerator.java | 23 +-
.../maven/BomDependenciesGeneratorMojo.java | 57 +-
.../camel/springboot/maven/BomGeneratorMojo.java | 16 +-
.../camel/springboot/maven/DynamicClassLoader.java | 2 +-
.../maven/PrepareCatalogSpringBootMojo.java | 104 ++-
.../maven/SpringBootAutoConfigurationMojo.java | 564 ++++++++------
.../springboot/maven/SpringBootStarterMojo.java | 41 +-
.../springboot/maven/StarterGeneratorMojo.java | 36 +-
...pdateSpringBootAutoConfigurationReadmeMojo.java | 11 +-
1048 files changed, 11394 insertions(+), 17844 deletions(-)
diff --git a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
index 2f4ce19af88..bb4ae199c9f 100644
--- a/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
+++ b/catalog/camel-catalog-provider-springboot/src/main/java/org/apache/camel/springboot/catalog/SpringBootRuntimeProvider.java
@@ -29,8 +29,8 @@ import org.apache.camel.catalog.RuntimeProvider;
import org.apache.camel.catalog.impl.CatalogHelper;
/**
- * A Spring Boot based {@link RuntimeProvider} which only includes the supported Camel components, data formats, and languages
- * which can be installed in Spring Boot using the starter dependencies.
+ * A Spring Boot based {@link RuntimeProvider} which only includes the supported Camel components, data formats, and
+ * languages which can be installed in Spring Boot using the starter dependencies.
*/
public class SpringBootRuntimeProvider implements RuntimeProvider {
diff --git a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroGenericMarshaAndUnmarshaTest.java b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroGenericMarshaAndUnmarshaTest.java
index 0c2eb70a259..80ce0e6fbcb 100644
--- a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroGenericMarshaAndUnmarshaTest.java
+++ b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroGenericMarshaAndUnmarshaTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.dataformat.avro.springboot.test;
-
import java.io.File;
import java.io.IOException;
@@ -42,31 +41,22 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- AvroGenericMarshaAndUnmarshaTest.class,
- AvroGenericMarshaAndUnmarshaTest.TestConfiguration.class
- }
-
+@SpringBootTest(classes = { CamelAutoConfiguration.class, AvroGenericMarshaAndUnmarshaTest.class,
+ AvroGenericMarshaAndUnmarshaTest.TestConfiguration.class }
+
)
public class AvroGenericMarshaAndUnmarshaTest {
-
+
private static Schema schema;
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reverse")
MockEndpoint mock;
-
-
-
@Test
public void testGenericMarshalAndUnmarshal() throws InterruptedException {
marshalAndUnmarshalGeneric("direct:in", "direct:back");
@@ -89,8 +79,6 @@ public class AvroGenericMarshaAndUnmarshaTest {
}
-
-
// *************************************
// Config
// *************************************
@@ -111,7 +99,7 @@ public class AvroGenericMarshaAndUnmarshaTest {
}
};
}
-
+
private Schema getSchema() throws IOException {
String schemaLocation = getClass().getResource("user.avsc").getFile();
File schemaFile = new File(schemaLocation);
diff --git a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallTest.java b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallTest.java
index ebc234072b7..546db06ec3f 100644
--- a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallTest.java
+++ b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.dataformat.avro.springboot.test;
-
import org.apache.camel.CamelContext;
import org.apache.camel.CamelException;
import org.apache.camel.EndpointInject;
@@ -38,31 +37,22 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- AvroMarshalAndUnmarshallTest.class,
- AvroMarshalAndUnmarshallTest.TestConfiguration.class
- },
- properties = {
- "camel.dataformat.avro.instance-class-name = org.apache.camel.dataformat.avro.springboot.test.Value"
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, AvroMarshalAndUnmarshallTest.class,
+ AvroMarshalAndUnmarshallTest.TestConfiguration.class }, properties = {
+ "camel.dataformat.avro.instance-class-name = org.apache.camel.dataformat.avro.springboot.test.Value" })
public class AvroMarshalAndUnmarshallTest {
@Autowired
private CamelContext context;
-
+
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reverse")
MockEndpoint mock;
-
@Test
public void testMarshalAndUnmarshalWithDataFormat() throws Exception {
marshalAndUnmarshal("direct:in", "direct:back");
@@ -84,8 +74,8 @@ public class AvroMarshalAndUnmarshallTest {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("direct:unmarshalC").unmarshal().avro(AvroLibrary.ApacheAvro, new CamelException("wrong schema"))
- .to("mock:reverse");
+ from("direct:unmarshalC").unmarshal()
+ .avro(AvroLibrary.ApacheAvro, new CamelException("wrong schema")).to("mock:reverse");
}
});
fail("Expect the exception here");
@@ -129,9 +119,11 @@ public class AvroMarshalAndUnmarshallTest {
from("direct:back").unmarshal(format).to("mock:reverse");
from("direct:marshal").marshal().avro(AvroLibrary.ApacheAvro);
- from("direct:unmarshalA").unmarshal().avro(AvroLibrary.ApacheAvro, Value.class.getName()).to("mock:reverse");
+ from("direct:unmarshalA").unmarshal().avro(AvroLibrary.ApacheAvro, Value.class.getName())
+ .to("mock:reverse");
- from("direct:unmarshalB").unmarshal().avro(AvroLibrary.ApacheAvro, Value.SCHEMA$).to("mock:reverse");
+ from("direct:unmarshalB").unmarshal().avro(AvroLibrary.ApacheAvro, Value.SCHEMA$)
+ .to("mock:reverse");
}
};
}
diff --git a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallXmlTest.java b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallXmlTest.java
index e15f777a0ec..d35bd45aa30 100644
--- a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallXmlTest.java
+++ b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/AvroMarshalAndUnmarshallXmlTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.dataformat.avro.springboot.test;
-
import org.apache.camel.CamelContext;
import org.apache.camel.CamelException;
import org.apache.camel.EndpointInject;
@@ -37,29 +36,21 @@ import org.springframework.context.annotation.Bean;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- AvroMarshalAndUnmarshallXmlTest.class
- },
- properties = {
- "camel.springboot.routes-include-pattern=file:src/test/resources/routes/springDataFormat.xml"}
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, AvroMarshalAndUnmarshallXmlTest.class }, properties = {
+ "camel.springboot.routes-include-pattern=file:src/test/resources/routes/springDataFormat.xml" })
public class AvroMarshalAndUnmarshallXmlTest {
@Autowired
private CamelContext context;
-
+
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reverse")
MockEndpoint mock;
-
@Test
public void testMarshalAndUnmarshalWithDataFormat() throws Exception {
marshalAndUnmarshal("direct:in", "direct:back");
@@ -81,8 +72,8 @@ public class AvroMarshalAndUnmarshallXmlTest {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- from("direct:unmarshalC").unmarshal().avro(AvroLibrary.ApacheAvro, new CamelException("wrong schema"))
- .to("mock:reverse");
+ from("direct:unmarshalC").unmarshal()
+ .avro(AvroLibrary.ApacheAvro, new CamelException("wrong schema")).to("mock:reverse");
}
});
fail("Expect the exception here");
@@ -108,7 +99,7 @@ public class AvroMarshalAndUnmarshallXmlTest {
assertEquals(input, output);
}
- @Bean(name = "avro1")
+ @Bean(name = "avro1")
AvroDataFormat getAvroDataFormat() {
AvroDataFormat avroDataFormat = new AvroDataFormat();
avroDataFormat.setInstanceClassName("org.apache.camel.dataformat.avro.springboot.test.Value");
diff --git a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/Value.java b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/Value.java
index 2b3c31e9c3f..b2336d5c149 100644
--- a/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/Value.java
+++ b/components-starter/camel-avro-starter/src/test/java/org/apache/camel/dataformat/avro/springboot/test/Value.java
@@ -17,123 +17,140 @@
// CHECKSTYLE:OFF
/**
* Autogenerated by Avro
- *
+ *
* DO NOT EDIT DIRECTLY
*/
package org.apache.camel.dataformat.avro.springboot.test;
@SuppressWarnings("all")
-public class Value extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord {
- public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse("{\"type\":\"record\",\"name\":\"Value\",\"namespace\":\"org.apache.camel.dataformat.avro.springboot.test\",\"fields\":[{\"name\":\"value\",\"type\":\"string\"}]}");
- @Deprecated public java.lang.CharSequence value;
- public org.apache.avro.Schema getSchema() { return SCHEMA$; }
- // Used by DatumWriter. Applications should not call.
- public java.lang.Object get(int field$) {
- switch (field$) {
- case 0: return value;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
- // Used by DatumReader. Applications should not call.
- @SuppressWarnings(value="unchecked")
- public void put(int field$, java.lang.Object value$) {
- switch (field$) {
- case 0: value = (java.lang.CharSequence)value$; break;
- default: throw new org.apache.avro.AvroRuntimeException("Bad index");
- }
- }
-
- /**
- * Gets the value of the 'value' field.
- */
- public java.lang.CharSequence getValue() {
- return value;
- }
-
- /**
- * Sets the value of the 'value' field.
- * @param value the value to set.
- */
- public void setValue(java.lang.CharSequence value) {
- this.value = value;
- }
-
- /** Creates a new Value RecordBuilder */
- public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder() {
- return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder();
- }
-
- /** Creates a new Value RecordBuilder by copying an existing Builder */
- public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder(org.apache.camel.dataformat.avro.springboot.test.Value.Builder other) {
- return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder(other);
- }
-
- /** Creates a new Value RecordBuilder by copying an existing Value instance */
- public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder(org.apache.camel.dataformat.avro.springboot.test.Value other) {
- return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder(other);
- }
-
- /**
- * RecordBuilder for Value instances.
- */
- public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Value>
- implements org.apache.avro.data.RecordBuilder<Value> {
-
- private java.lang.CharSequence value;
-
- /** Creates a new Builder */
- private Builder() {
- super(org.apache.camel.dataformat.avro.springboot.test.Value.SCHEMA$);
+public class Value extends org.apache.avro.specific.SpecificRecordBase
+ implements org.apache.avro.specific.SpecificRecord {
+ public static final org.apache.avro.Schema SCHEMA$ = org.apache.avro.Schema.parse(
+ "{\"type\":\"record\",\"name\":\"Value\",\"namespace\":\"org.apache.camel.dataformat.avro.springboot.test\",\"fields\":[{\"name\":\"value\",\"type\":\"string\"}]}");
+ @Deprecated
+ public java.lang.CharSequence value;
+
+ public org.apache.avro.Schema getSchema() {
+ return SCHEMA$;
}
-
- /** Creates a Builder by copying an existing Builder */
- private Builder(org.apache.camel.dataformat.avro.springboot.test.Value.Builder other) {
- super(other);
+
+ // Used by DatumWriter. Applications should not call.
+ public java.lang.Object get(int field$) {
+ switch (field$) {
+ case 0:
+ return value;
+ default:
+ throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
}
-
- /** Creates a Builder by copying an existing Value instance */
- private Builder(org.apache.camel.dataformat.avro.springboot.test.Value other) {
- super(org.apache.camel.dataformat.avro.springboot.test.Value.SCHEMA$);
- if (isValidValue(fields()[0], other.value)) {
- this.value = data().deepCopy(fields()[0].schema(), other.value);
- fieldSetFlags()[0] = true;
- }
+
+ // Used by DatumReader. Applications should not call.
+ @SuppressWarnings(value = "unchecked")
+ public void put(int field$, java.lang.Object value$) {
+ switch (field$) {
+ case 0:
+ value = (java.lang.CharSequence) value$;
+ break;
+ default:
+ throw new org.apache.avro.AvroRuntimeException("Bad index");
+ }
}
- /** Gets the value of the 'value' field */
+ /**
+ * Gets the value of the 'value' field.
+ */
public java.lang.CharSequence getValue() {
- return value;
+ return value;
+ }
+
+ /**
+ * Sets the value of the 'value' field.
+ *
+ * @param value
+ * the value to set.
+ */
+ public void setValue(java.lang.CharSequence value) {
+ this.value = value;
}
-
- /** Sets the value of the 'value' field */
- public org.apache.camel.dataformat.avro.springboot.test.Value.Builder setValue(java.lang.CharSequence value) {
- validate(fields()[0], value);
- this.value = value;
- fieldSetFlags()[0] = true;
- return this;
+
+ /** Creates a new Value RecordBuilder */
+ public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder() {
+ return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder();
}
-
- /** Checks whether the 'value' field has been set */
- public boolean hasValue() {
- return fieldSetFlags()[0];
+
+ /** Creates a new Value RecordBuilder by copying an existing Builder */
+ public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder(
+ org.apache.camel.dataformat.avro.springboot.test.Value.Builder other) {
+ return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder(other);
}
-
- /** Clears the value of the 'value' field */
- public org.apache.camel.dataformat.avro.springboot.test.Value.Builder clearValue() {
- value = null;
- fieldSetFlags()[0] = false;
- return this;
+
+ /** Creates a new Value RecordBuilder by copying an existing Value instance */
+ public static org.apache.camel.dataformat.avro.springboot.test.Value.Builder newBuilder(
+ org.apache.camel.dataformat.avro.springboot.test.Value other) {
+ return new org.apache.camel.dataformat.avro.springboot.test.Value.Builder(other);
}
- @Override
- public Value build() {
- try {
- Value record = new Value();
- record.value = fieldSetFlags()[0] ? this.value : (java.lang.CharSequence) defaultValue(fields()[0]);
- return record;
- } catch (Exception e) {
- throw new org.apache.avro.AvroRuntimeException(e);
- }
+ /**
+ * RecordBuilder for Value instances.
+ */
+ public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<Value>
+ implements org.apache.avro.data.RecordBuilder<Value> {
+
+ private java.lang.CharSequence value;
+
+ /** Creates a new Builder */
+ private Builder() {
+ super(org.apache.camel.dataformat.avro.springboot.test.Value.SCHEMA$);
+ }
+
+ /** Creates a Builder by copying an existing Builder */
+ private Builder(org.apache.camel.dataformat.avro.springboot.test.Value.Builder other) {
+ super(other);
+ }
+
+ /** Creates a Builder by copying an existing Value instance */
+ private Builder(org.apache.camel.dataformat.avro.springboot.test.Value other) {
+ super(org.apache.camel.dataformat.avro.springboot.test.Value.SCHEMA$);
+ if (isValidValue(fields()[0], other.value)) {
+ this.value = data().deepCopy(fields()[0].schema(), other.value);
+ fieldSetFlags()[0] = true;
+ }
+ }
+
+ /** Gets the value of the 'value' field */
+ public java.lang.CharSequence getValue() {
+ return value;
+ }
+
+ /** Sets the value of the 'value' field */
+ public org.apache.camel.dataformat.avro.springboot.test.Value.Builder setValue(java.lang.CharSequence value) {
+ validate(fields()[0], value);
+ this.value = value;
+ fieldSetFlags()[0] = true;
+ return this;
+ }
+
+ /** Checks whether the 'value' field has been set */
+ public boolean hasValue() {
+ return fieldSetFlags()[0];
+ }
+
+ /** Clears the value of the 'value' field */
+ public org.apache.camel.dataformat.avro.springboot.test.Value.Builder clearValue() {
+ value = null;
+ fieldSetFlags()[0] = false;
+ return this;
+ }
+
+ @Override
+ public Value build() {
+ try {
+ Value record = new Value();
+ record.value = fieldSetFlags()[0] ? this.value : (java.lang.CharSequence) defaultValue(fields()[0]);
+ return record;
+ } catch (Exception e) {
+ throw new org.apache.avro.AvroRuntimeException(e);
+ }
+ }
}
- }
}
diff --git a/components-starter/camel-aws2-cw-starter/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java b/components-starter/camel-aws2-cw-starter/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
index d18a35a709d..26df0300779 100644
--- a/components-starter/camel-aws2-cw-starter/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
+++ b/components-starter/camel-aws2-cw-starter/src/test/java/org/apache/camel/component/aws2/cw/CwComponentTest.java
@@ -42,13 +42,8 @@ import java.time.Instant;
//Based on CwComponentIT
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CwComponentTest.class,
- CwComponentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CwComponentTest.class,
+ CwComponentTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CwComponentTest extends BaseCw {
@@ -71,7 +66,8 @@ public class CwComponentTest extends BaseCw {
assertMockEndpointsSatisfied();
CloudWatchClient client = AWSSDKClientUtils.newCloudWatchClient();
- ListMetricsResponse resp = client.listMetrics( ListMetricsRequest.builder().namespace("http://camel.apache.org/aws-cw").build());
+ ListMetricsResponse resp = client
+ .listMetrics(ListMetricsRequest.builder().namespace("http://camel.apache.org/aws-cw").build());
Assertions.assertEquals(1, resp.metrics().size());
Assertions.assertEquals("ExchangesCompleted", resp.metrics().get(0).metricName());
@@ -88,8 +84,7 @@ public class CwComponentTest extends BaseCw {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to("aws2-cw://http://camel.apache.org/aws-cw")
- .to("mock:result");
+ from("direct:start").to("aws2-cw://http://camel.apache.org/aws-cw").to("mock:result");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2BatchGetItemsTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2BatchGetItemsTest.java
index 2f980a0887a..0cad1986451 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2BatchGetItemsTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2BatchGetItemsTest.java
@@ -51,13 +51,8 @@ import static org.junit.jupiter.api.Assertions.assertNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2BatchGetItemsTest.class,
- Ddb2BatchGetItemsTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2BatchGetItemsTest.class,
+ Ddb2BatchGetItemsTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2BatchGetItemsTest extends BaseDdb2 {
@@ -70,26 +65,15 @@ public class Ddb2BatchGetItemsTest extends BaseDdb2 {
private final String retrieveValue = "retrieve";
private final String notRetrieveValue = "ignore";
-
@BeforeAll
protected static void setupResources() throws Exception {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- CreateTableRequest createTableRequest = CreateTableRequest.builder()
- .tableName(tableName)
- .keySchema(
- KeySchemaElement.builder()
- .attributeName(attributeName)
- .keyType(KeyType.HASH)
- .build())
- .attributeDefinitions(
- AttributeDefinition.builder()
- .attributeType(ScalarAttributeType.S)
- .attributeName(attributeName)
- .build())
- .provisionedThroughput(ProvisionedThroughput.builder()
- .readCapacityUnits(5L)
- .writeCapacityUnits(5L)
- .build())
+ CreateTableRequest createTableRequest = CreateTableRequest.builder().tableName(tableName)
+ .keySchema(KeySchemaElement.builder().attributeName(attributeName).keyType(KeyType.HASH).build())
+ .attributeDefinitions(AttributeDefinition.builder().attributeType(ScalarAttributeType.S)
+ .attributeName(attributeName).build())
+ .provisionedThroughput(
+ ProvisionedThroughput.builder().readCapacityUnits(5L).writeCapacityUnits(5L).build())
.build();
ddbClient.createTable(createTableRequest);
}
@@ -97,9 +81,7 @@ public class Ddb2BatchGetItemsTest extends BaseDdb2 {
@AfterAll
protected static void cleanupResources() throws Exception {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder()
- .tableName(tableName)
- .build();
+ DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder().tableName(tableName).build();
ddbClient.deleteTable(deleteTableRequest);
}
@@ -115,9 +97,7 @@ public class Ddb2BatchGetItemsTest extends BaseDdb2 {
Map<String, AttributeValue> key = new HashMap<>();
key.put(attributeName, AttributeValue.builder().s(retrieveValue).build());
Map<String, KeysAndAttributes> keysAndAttributesMap = new HashMap<>();
- KeysAndAttributes keysAndAttributes = KeysAndAttributes.builder()
- .keys(key)
- .build();
+ KeysAndAttributes keysAndAttributes = KeysAndAttributes.builder().keys(key).build();
keysAndAttributesMap.put(tableName, keysAndAttributes);
e.getIn().setHeader(Ddb2Constants.BATCH_ITEMS, keysAndAttributesMap);
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteItemTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteItemTest.java
index 43ffadb73a0..06d143c236f 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteItemTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteItemTest.java
@@ -41,16 +41,10 @@ import java.util.Map;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2DeleteItemTest.class,
- Ddb2DeleteItemTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2DeleteItemTest.class,
+ Ddb2DeleteItemTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2DeleteItemTest extends BaseDdb2 {
@@ -109,10 +103,9 @@ public class Ddb2DeleteItemTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteTableTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteTableTest.java
index 2fcd451710b..317feca221c 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteTableTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DeleteTableTest.java
@@ -38,13 +38,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2DeleteTableTest.class,
- Ddb2DeleteTableTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2DeleteTableTest.class,
+ Ddb2DeleteTableTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2DeleteTableTest extends BaseDdb2 {
@@ -57,7 +52,7 @@ public class Ddb2DeleteTableTest extends BaseDdb2 {
@Test
public void deleteTable() {
- //First we run the delete command, which will say the table is still active
+ // First we run the delete command, which will say the table is still active
Exchange exchange = template.send("direct:start", new Processor() {
public void process(Exchange exchange) {
exchange.getIn().setHeader(Ddb2Constants.OPERATION, Ddb2Operations.DeleteTable);
@@ -68,7 +63,7 @@ public class Ddb2DeleteTableTest extends BaseDdb2 {
assertEquals(tableName, exchange.getIn().getHeader(Ddb2Constants.TABLE_NAME));
assertEquals(TableStatus.ACTIVE, exchange.getIn().getHeader(Ddb2Constants.TABLE_STATUS));
- //And... it's gone.
+ // And... it's gone.
exchange = template.send("direct:start", new Processor() {
public void process(Exchange exchange) {
exchange.getIn().setHeader(Ddb2Constants.OPERATION, Ddb2Operations.DeleteTable);
@@ -78,7 +73,6 @@ public class Ddb2DeleteTableTest extends BaseDdb2 {
assertEquals(null, exchange.getIn().getHeader(Ddb2Constants.TABLE_STATUS));
}
-
// *************************************
// Config
// *************************************
@@ -90,10 +84,9 @@ public class Ddb2DeleteTableTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DescribeTableRuleIT.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DescribeTableRuleIT.java
index 086edb5b626..c8384021c98 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DescribeTableRuleIT.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2DescribeTableRuleIT.java
@@ -38,13 +38,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2DescribeTableRuleIT.class,
- Ddb2DescribeTableRuleIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2DescribeTableRuleIT.class,
+ Ddb2DescribeTableRuleIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2DescribeTableRuleIT extends BaseDdb2 {
@@ -80,10 +75,9 @@ public class Ddb2DescribeTableRuleIT extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2GetItemTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2GetItemTest.java
index 71113885bb9..5d20b091f21 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2GetItemTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2GetItemTest.java
@@ -42,13 +42,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2GetItemTest.class,
- Ddb2GetItemTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2GetItemTest.class,
+ Ddb2GetItemTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2GetItemTest extends BaseDdb2 {
private Exchange exchange;
@@ -107,10 +102,9 @@ public class Ddb2GetItemTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2QueryTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2QueryTest.java
index 132b31b9f57..4a25a8cd016 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2QueryTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2QueryTest.java
@@ -52,13 +52,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2QueryTest.class,
- Ddb2QueryTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2QueryTest.class, Ddb2QueryTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2QueryTest extends BaseDdb2 {
@@ -72,43 +66,28 @@ public class Ddb2QueryTest extends BaseDdb2 {
private final String notRetrieveValue = "ignore";
@BeforeAll
- protected static void setupResources() {
+ protected static void setupResources() {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- CreateTableRequest createTableRequest = CreateTableRequest.builder()
- .tableName(tableName)
- .keySchema(
- KeySchemaElement.builder()
- .attributeName(attributeName)
- .keyType(KeyType.HASH)
- .build(),
- KeySchemaElement.builder()
- .attributeName(secondaryAttributeName)
- .keyType(KeyType.RANGE)
- .build())
- .attributeDefinitions(AttributeDefinition.builder()
- .attributeType(ScalarAttributeType.S)
- .attributeName(secondaryAttributeName)
- .build(),
- AttributeDefinition.builder()
- .attributeType(ScalarAttributeType.S)
- .attributeName(attributeName)
+ CreateTableRequest createTableRequest = CreateTableRequest.builder().tableName(tableName)
+ .keySchema(KeySchemaElement.builder().attributeName(attributeName).keyType(KeyType.HASH).build(),
+ KeySchemaElement.builder().attributeName(secondaryAttributeName).keyType(KeyType.RANGE).build())
+ .attributeDefinitions(
+ AttributeDefinition.builder().attributeType(ScalarAttributeType.S)
+ .attributeName(secondaryAttributeName).build(),
+ AttributeDefinition.builder().attributeType(ScalarAttributeType.S).attributeName(attributeName)
.build())
- .provisionedThroughput(ProvisionedThroughput.builder()
- .readCapacityUnits(5L)
- .writeCapacityUnits(5L)
- .build())
+ .provisionedThroughput(
+ ProvisionedThroughput.builder().readCapacityUnits(5L).writeCapacityUnits(5L).build())
.build();
ddbClient.createTable(createTableRequest);
}
@AfterAll
- protected static void cleanupResources() {
+ protected static void cleanupResources() {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder()
- .tableName(tableName)
- .build();
+ DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder().tableName(tableName).build();
ddbClient.deleteTable(deleteTableRequest);
}
@@ -125,10 +104,8 @@ public class Ddb2QueryTest extends BaseDdb2 {
e.getIn().setHeader(Ddb2Constants.OPERATION, Ddb2Operations.Query);
e.getIn().setHeader(Ddb2Constants.CONSISTENT_READ, true);
Map<String, Condition> keyConditions = new HashMap<>();
- keyConditions.put(attributeName, Condition.builder().comparisonOperator(
- ComparisonOperator.EQ.toString())
- .attributeValueList(AttributeValue.builder().s(retrieveValue).build())
- .build());
+ keyConditions.put(attributeName, Condition.builder().comparisonOperator(ComparisonOperator.EQ.toString())
+ .attributeValueList(AttributeValue.builder().s(retrieveValue).build()).build());
e.getIn().setHeader(Ddb2Constants.KEY_CONDITIONS, keyConditions);
});
@@ -150,7 +127,6 @@ public class Ddb2QueryTest extends BaseDdb2 {
});
}
-
// *************************************
// Config
// *************************************
@@ -162,8 +138,7 @@ public class Ddb2QueryTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName);
+ from("direct:start").to("aws2-ddb://" + tableName);
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ScanTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ScanTest.java
index 43fe58e2826..c3e70df8732 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ScanTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2ScanTest.java
@@ -53,13 +53,7 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2ScanTest.class,
- Ddb2ScanTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2ScanTest.class, Ddb2ScanTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2ScanTest extends BaseDdb2 {
@@ -76,29 +70,16 @@ public class Ddb2ScanTest extends BaseDdb2 {
protected static void setupResources() throws Exception {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- CreateTableRequest createTableRequest = CreateTableRequest.builder()
- .tableName(tableName)
- .keySchema(
- KeySchemaElement.builder()
- .attributeName(attributeName)
- .keyType(KeyType.HASH)
- .build(),
- KeySchemaElement.builder()
- .attributeName(secondaryAttributeName)
- .keyType(KeyType.RANGE)
- .build())
- .attributeDefinitions(AttributeDefinition.builder()
- .attributeType(ScalarAttributeType.S)
- .attributeName(secondaryAttributeName)
- .build(),
- AttributeDefinition.builder()
- .attributeType(ScalarAttributeType.S)
- .attributeName(attributeName)
+ CreateTableRequest createTableRequest = CreateTableRequest.builder().tableName(tableName)
+ .keySchema(KeySchemaElement.builder().attributeName(attributeName).keyType(KeyType.HASH).build(),
+ KeySchemaElement.builder().attributeName(secondaryAttributeName).keyType(KeyType.RANGE).build())
+ .attributeDefinitions(
+ AttributeDefinition.builder().attributeType(ScalarAttributeType.S)
+ .attributeName(secondaryAttributeName).build(),
+ AttributeDefinition.builder().attributeType(ScalarAttributeType.S).attributeName(attributeName)
.build())
- .provisionedThroughput(ProvisionedThroughput.builder()
- .readCapacityUnits(5L)
- .writeCapacityUnits(5L)
- .build())
+ .provisionedThroughput(
+ ProvisionedThroughput.builder().readCapacityUnits(5L).writeCapacityUnits(5L).build())
.build();
CreateTableResponse res = ddbClient.createTable(createTableRequest);
}
@@ -107,9 +88,7 @@ public class Ddb2ScanTest extends BaseDdb2 {
protected static void cleanupResources() {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder()
- .tableName(tableName)
- .build();
+ DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder().tableName(tableName).build();
ddbClient.deleteTable(deleteTableRequest);
}
@@ -127,10 +106,8 @@ public class Ddb2ScanTest extends BaseDdb2 {
e.getIn().setHeader(Ddb2Constants.OPERATION, Ddb2Operations.Scan);
e.getIn().setHeader(Ddb2Constants.CONSISTENT_READ, true);
Map<String, Condition> keyConditions = new HashMap<>();
- keyConditions.put(attributeName, Condition.builder().comparisonOperator(
- ComparisonOperator.EQ.toString())
- .attributeValueList(AttributeValue.builder().s(retrieveValue).build())
- .build());
+ keyConditions.put(attributeName, Condition.builder().comparisonOperator(ComparisonOperator.EQ.toString())
+ .attributeValueList(AttributeValue.builder().s(retrieveValue).build()).build());
e.getIn().setHeader(Ddb2Constants.SCAN_FILTER, keyConditions);
});
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateItemTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateItemTest.java
index def8a75767b..7bf678223e4 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateItemTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateItemTest.java
@@ -46,13 +46,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2UpdateItemTest.class,
- Ddb2UpdateItemTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2UpdateItemTest.class,
+ Ddb2UpdateItemTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2UpdateItemTest extends BaseDdb2 {
@@ -92,9 +87,7 @@ public class Ddb2UpdateItemTest extends BaseDdb2 {
HashMap<String, AttributeValueUpdate> attributeMapUpdated = new HashMap<String, AttributeValueUpdate>();
attributeMapUpdated.put("secondary_attribute", AttributeValueUpdate.builder()
- .value(AttributeValue.builder().s("new").build())
- .action(AttributeAction.PUT)
- .build());
+ .value(AttributeValue.builder().s("new").build()).action(AttributeAction.PUT).build());
exchange = template.send("direct:start", new Processor() {
public void process(Exchange exchange) {
@@ -122,10 +115,9 @@ public class Ddb2UpdateItemTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateTableByIdTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateTableByIdTest.java
index 38bdf642737..b0bf35f2839 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateTableByIdTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddb/Ddb2UpdateTableByIdTest.java
@@ -37,13 +37,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2UpdateTableByIdTest.class,
- Ddb2UpdateTableByIdTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2UpdateTableByIdTest.class,
+ Ddb2UpdateTableByIdTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Ddb2UpdateTableByIdTest extends BaseDdb2 {
@@ -67,7 +62,6 @@ public class Ddb2UpdateTableByIdTest extends BaseDdb2 {
assertEquals(Long.valueOf(20), exchange.getIn().getHeader(Ddb2Constants.READ_CAPACITY));
}
-
// *************************************
// Config
// *************************************
@@ -79,10 +73,9 @@ public class Ddb2UpdateTableByIdTest extends BaseDdb2 {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").to(
- "aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName + "&keyAttributeType=" + KeyType.HASH
- + "&keyScalarType=" + ScalarAttributeType.S
- + "&readCapacity=1&writeCapacity=1");
+ from("direct:start").to("aws2-ddb://" + tableName + "?keyAttributeName=" + attributeName
+ + "&keyAttributeType=" + KeyType.HASH + "&keyScalarType=" + ScalarAttributeType.S
+ + "&readCapacity=1&writeCapacity=1");
}
};
}
diff --git a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamTest.java b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamTest.java
index 54a45b5d335..bf9e5efa684 100644
--- a/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamTest.java
+++ b/components-starter/camel-aws2-ddb-starter/src/test/java/org/apache/camel/component/aws2/ddbstream/Ddb2StreamTest.java
@@ -56,13 +56,8 @@ import static org.awaitility.Awaitility.await;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Ddb2StreamTest.class,
- Ddb2StreamTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Ddb2StreamTest.class,
+ Ddb2StreamTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
class Ddb2StreamTest extends BaseDdb2 {
@@ -83,30 +78,19 @@ class Ddb2StreamTest extends BaseDdb2 {
protected static void cleanupResources() {
DynamoDbClient ddbClient = AWSSDKClientUtils.newDynamoDBClient();
- DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder()
- .tableName(tableName)
- .build();
+ DeleteTableRequest deleteTableRequest = DeleteTableRequest.builder().tableName(tableName).build();
ddbClient.deleteTable(deleteTableRequest);
}
private static CreateTableRequest.Builder createTableRequest(String tableName, String keyColumn) {
CreateTableRequest.Builder builder = CreateTableRequest.builder()
- .attributeDefinitions(AttributeDefinition.builder()
- .attributeName(keyColumn)
- .attributeType(ScalarAttributeType.S)
- .build())
- .keySchema(KeySchemaElement.builder()
- .attributeName(keyColumn)
- .keyType(KeyType.HASH)
- .build())
- .provisionedThroughput(ProvisionedThroughput.builder()
- .readCapacityUnits(10L)
- .writeCapacityUnits(10L)
- .build())
- .streamSpecification(StreamSpecification.builder()
- .streamEnabled(true)
- .streamViewType(StreamViewType.NEW_AND_OLD_IMAGES)
- .build());
+ .attributeDefinitions(AttributeDefinition.builder().attributeName(keyColumn)
+ .attributeType(ScalarAttributeType.S).build())
+ .keySchema(KeySchemaElement.builder().attributeName(keyColumn).keyType(KeyType.HASH).build())
+ .provisionedThroughput(
+ ProvisionedThroughput.builder().readCapacityUnits(10L).writeCapacityUnits(10L).build())
+ .streamSpecification(StreamSpecification.builder().streamEnabled(true)
+ .streamViewType(StreamViewType.NEW_AND_OLD_IMAGES).build());
return builder.tableName(tableName);
}
@@ -115,14 +99,15 @@ class Ddb2StreamTest extends BaseDdb2 {
public void stream() throws InterruptedException {
final String key1 = "key-" + UUID.randomUUID().toString().replace("-", "");
final String msg1 = "val" + UUID.randomUUID().toString().replace("-", "");
-
- //try periodically receive stream event. We do not know, when the consumer is started, therefore we try it several times
- //if one event is returned, stream consumer works
+
+ // try periodically receive stream event. We do not know, when the consumer is started, therefore we try it
+ // several times
+ // if one event is returned, stream consumer works
await().pollInterval(2, TimeUnit.SECONDS).atMost(30, TimeUnit.SECONDS).until(() -> {
boolean res = !resultEndpoint.getReceivedExchanges().isEmpty();
- if(!res) {
+ if (!res) {
resultEndpoint.reset();
- //insert new item for the test
+ // insert new item for the test
insertItem(key1, msg1);
}
return res;
@@ -132,24 +117,16 @@ class Ddb2StreamTest extends BaseDdb2 {
private void insertItem(String key1, String msg1) {
final Map<String, AttributeValue> item = new HashMap<>() {
{
- put("key", AttributeValue.builder()
- .s(key1).build());
- put("value", AttributeValue.builder()
- .s(msg1).build());
+ put("key", AttributeValue.builder().s(key1).build());
+ put("value", AttributeValue.builder().s(msg1).build());
}
};
- template.sendBodyAndHeaders(
- "aws2-ddb://" + tableName + "?operation=" + Ddb2Operations.PutItem,
- null,
+ template.sendBodyAndHeaders("aws2-ddb://" + tableName + "?operation=" + Ddb2Operations.PutItem, null,
new HashMap<>() {
{
- put(
- Ddb2Constants.CONSISTENT_READ,
- true);
- put(
- Ddb2Constants.ITEM,
- item);
+ put(Ddb2Constants.CONSISTENT_READ, true);
+ put(Ddb2Constants.ITEM, item);
}
});
}
@@ -159,7 +136,7 @@ class Ddb2StreamTest extends BaseDdb2 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseDdb2.TestConfiguration{
+ public class TestConfiguration extends BaseDdb2.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
@@ -167,22 +144,22 @@ class Ddb2StreamTest extends BaseDdb2 {
@Override
public void configure() {
- //{aws.secret.key=secretkey, aws.region=us-east-1, aws.access.key=accesskey, aws.host=localhost:49242, aws.protocol=http}
- String auth = service.getConnectionProperties().entrySet().stream()
- .map(e1 -> {
- switch (String.valueOf(e1.getKey())) {
- case "aws.secret.key":
- return "secretKey=" + e1.getValue();
- case "aws.region":
- return "region=" + e1.getValue();
- case "aws.access.key":
- return "accessKey=" + e1.getValue();
- case "aws.host":
- return "overrideEndpoint=true&uriEndpointOverride=http://" + e1.getValue();
- default: return "";
- }})
- .filter(e -> !"".equals(e))
- .collect(Collectors.joining("&"));
+ // {aws.secret.key=secretkey, aws.region=us-east-1, aws.access.key=accesskey,
+ // aws.host=localhost:49242, aws.protocol=http}
+ String auth = service.getConnectionProperties().entrySet().stream().map(e1 -> {
+ switch (String.valueOf(e1.getKey())) {
+ case "aws.secret.key":
+ return "secretKey=" + e1.getValue();
+ case "aws.region":
+ return "region=" + e1.getValue();
+ case "aws.access.key":
+ return "accessKey=" + e1.getValue();
+ case "aws.host":
+ return "overrideEndpoint=true&uriEndpointOverride=http://" + e1.getValue();
+ default:
+ return "";
+ }
+ }).filter(e -> !"".equals(e)).collect(Collectors.joining("&"));
from("aws2-ddbstream://" + tableName + "?" + auth).to("mock:result");
}
diff --git a/components-starter/camel-aws2-kinesis-starter/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisComponentTest.java b/components-starter/camel-aws2-kinesis-starter/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisComponentTest.java
index bdc0cb28278..53d6684663f 100644
--- a/components-starter/camel-aws2-kinesis-starter/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisComponentTest.java
+++ b/components-starter/camel-aws2-kinesis-starter/src/test/java/org/apache/camel/component/aws2/kinesis/KinesisComponentTest.java
@@ -39,13 +39,8 @@ import software.amazon.awssdk.services.kinesis.model.CreateStreamRequest;
//Based on CwComponentIT
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- KinesisComponentTest.class,
- KinesisComponentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, KinesisComponentTest.class,
+ KinesisComponentTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class KinesisComponentTest extends BaseKinesis {
@@ -57,21 +52,16 @@ public class KinesisComponentTest extends BaseKinesis {
@BeforeAll
static void setUp() {
client = AWSSDKClientUtils.newKinesisClient();
- client.createStream(
- CreateStreamRequest.builder()
- .shardCount(1)
- .streamName("kinesis1")
- .build());
+ client.createStream(CreateStreamRequest.builder().shardCount(1).streamName("kinesis1").build());
}
@AfterAll
static void clean() {
- if(client != null) {
+ if (client != null) {
client.close();
}
}
-
@Test
public void send() throws Exception {
result.expectedMessageCount(2);
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3BatchConsumerTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3BatchConsumerTest.java
index fec432dd099..48907718078 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3BatchConsumerTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3BatchConsumerTest.java
@@ -35,13 +35,8 @@ import org.springframework.test.annotation.DirtiesContext;
//Based on S3ConsumerIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3BatchConsumerTest.class,
- S3BatchConsumerTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3BatchConsumerTest.class,
+ S3BatchConsumerTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3BatchConsumerTest extends BaseS3 {
@@ -84,15 +79,15 @@ public class S3BatchConsumerTest extends BaseS3 {
final Exchange exchange1 = result.getExchanges().get(0);
Assertions.assertEquals(0, exchange1.getProperty(ExchangePropertyKey.BATCH_INDEX));
Assertions.assertEquals(2, exchange1.getProperty(ExchangePropertyKey.BATCH_SIZE));
- Assertions.assertFalse((Boolean)exchange1.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
+ Assertions.assertFalse((Boolean) exchange1.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
final Exchange exchange2 = result.getExchanges().get(1);
Assertions.assertEquals(1, exchange2.getProperty(ExchangePropertyKey.BATCH_INDEX));
Assertions.assertEquals(2, exchange2.getProperty(ExchangePropertyKey.BATCH_SIZE));
- Assertions.assertTrue((Boolean)exchange2.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
+ Assertions.assertTrue((Boolean) exchange2.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
final Exchange exchange3 = result.getExchanges().get(2);
Assertions.assertEquals(0, exchange3.getProperty(ExchangePropertyKey.BATCH_INDEX));
- Assertions.assertEquals(1 , exchange3.getProperty(ExchangePropertyKey.BATCH_SIZE));
- Assertions.assertTrue((Boolean)exchange3.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
+ Assertions.assertEquals(1, exchange3.getProperty(ExchangePropertyKey.BATCH_SIZE));
+ Assertions.assertTrue((Boolean) exchange3.getProperty(ExchangePropertyKey.BATCH_COMPLETE));
}
// *************************************
@@ -100,10 +95,10 @@ public class S3BatchConsumerTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true&maxMessagesPerPoll=2";
+ final String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true&maxMessagesPerPoll=2";
return new RouteBuilder() {
@Override
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentTest.java
index 733fcfbed5f..e8e32cf0d91 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ComponentTest.java
@@ -40,17 +40,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
// Based on S3ComponentManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3ComponentTest.class,
- S3ComponentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3ComponentTest.class,
+ S3ComponentTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3ComponentTest extends BaseS3 {
-
@EndpointInject("mock:result")
private MockEndpoint result;
@@ -122,17 +116,15 @@ public class S3ComponentTest extends BaseS3 {
assertNull(message.getHeader(AWS2S3Constants.VERSION_ID));
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String s3EndpointUri
- = "aws2-s3://mycamelbucket?autoCreateBucket=true";
+ final String s3EndpointUri = "aws2-s3://mycamelbucket?autoCreateBucket=true";
return new RouteBuilder() {
@Override
public void configure() {
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectCustomerKeyTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectCustomerKeyTest.java
index b1e72f17be9..b1431b0da06 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectCustomerKeyTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectCustomerKeyTest.java
@@ -56,13 +56,8 @@ import static software.amazon.awssdk.services.s3.model.ServerSideEncryption.AES2
//Based on S3CopyObjectCustomerKeyIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3CopyObjectCustomerKeyTest.class,
- S3CopyObjectCustomerKeyTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3CopyObjectCustomerKeyTest.class,
+ S3CopyObjectCustomerKeyTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3CopyObjectCustomerKeyTest extends BaseS3 {
@@ -101,12 +96,8 @@ public class S3CopyObjectCustomerKeyTest extends BaseS3 {
@Override
public void process(Exchange exchange) {
- GetObjectRequest getObjectRequest = GetObjectRequest.builder()
- .key("test1.txt")
- .bucket("mycamel1")
- .sseCustomerKey(b64Key)
- .sseCustomerAlgorithm(AES256.name())
- .sseCustomerKeyMD5(b64KeyMd5)
+ GetObjectRequest getObjectRequest = GetObjectRequest.builder().key("test1.txt").bucket("mycamel1")
+ .sseCustomerKey(b64Key).sseCustomerAlgorithm(AES256.name()).sseCustomerKeyMD5(b64KeyMd5)
.build();
exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.getObject);
exchange.getIn().setBody(getObjectRequest);
@@ -145,19 +136,19 @@ public class S3CopyObjectCustomerKeyTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
@Override
public void configure() {
- String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true&useCustomerKey=true&customerKeyId=RAW(" + b64Key
- + ")&customerKeyMD5=RAW(" + b64KeyMd5 + ")&customerAlgorithm=" + AES256.name();
+ String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true&useCustomerKey=true&customerKeyId=RAW("
+ + b64Key + ")&customerKeyMD5=RAW(" + b64KeyMd5 + ")&customerAlgorithm=" + AES256.name();
String awsEndpoint1 = "aws2-s3://mycamel1?autoCreateBucket=true&pojoRequest=true";
String awsEndpoint2 = "aws2-s3://mycamel1?autoCreateBucket=true";
- from("direct:putObject").setHeader(AWS2S3Constants.KEY, constant("test.txt")).setBody(constant("Test"))
- .to(awsEndpoint);
+ from("direct:putObject").setHeader(AWS2S3Constants.KEY, constant("test.txt"))
+ .setBody(constant("Test")).to(awsEndpoint);
from("direct:copyObject").to(awsEndpoint);
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectOperationTest.java
index b8599b32784..f73b1c0970a 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CopyObjectOperationTest.java
@@ -34,13 +34,8 @@ import software.amazon.awssdk.services.s3.S3Client;
//Based on S3CopyObjectOperationManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3CopyObjectOperationTest.class,
- S3CopyObjectOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3CopyObjectOperationTest.class,
+ S3CopyObjectOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3CopyObjectOperationTest extends BaseS3 {
private static final String ACCESS_KEY = System.getProperty("aws.manual.access.key");
@@ -81,7 +76,7 @@ public class S3CopyObjectOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CreateDownloadLinkOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CreateDownloadLinkOperationTest.java
index fb35853b029..3838041911d 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CreateDownloadLinkOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3CreateDownloadLinkOperationTest.java
@@ -38,13 +38,8 @@ import static org.junit.Assert.assertNull;
//Based on S3CreateDownloadLinkOperationIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3CreateDownloadLinkOperationTest.class,
- S3CreateDownloadLinkOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3CreateDownloadLinkOperationTest.class,
+ S3CreateDownloadLinkOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3CreateDownloadLinkOperationTest extends BaseS3 {
@@ -90,7 +85,7 @@ public class S3CreateDownloadLinkOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
@@ -109,5 +104,4 @@ public class S3CreateDownloadLinkOperationTest extends BaseS3 {
}
}
-
}
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ListObjectsOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ListObjectsOperationTest.java
index 9588ebc34c2..1054ae7160f 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ListObjectsOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ListObjectsOperationTest.java
@@ -42,13 +42,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
//Based on S3ListObjectsOperationIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3ListObjectsOperationTest.class,
- S3ListObjectsOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3ListObjectsOperationTest.class,
+ S3ListObjectsOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3ListObjectsOperationTest extends BaseS3 {
@@ -101,7 +96,7 @@ public class S3ListObjectsOperationTest extends BaseS3 {
}
});
- //verify that is deleted
+ // verify that is deleted
ex = template.request("direct:listObjects", new Processor() {
@Override
@@ -131,7 +126,7 @@ public class S3ListObjectsOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MoveAfterReadConsumerTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MoveAfterReadConsumerTest.java
index 43b5a566c0e..f0d2a6c4107 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MoveAfterReadConsumerTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MoveAfterReadConsumerTest.java
@@ -41,13 +41,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
//Based on S3ConsumerIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3MoveAfterReadConsumerTest.class,
- S3MoveAfterReadConsumerTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3MoveAfterReadConsumerTest.class,
+ S3MoveAfterReadConsumerTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3MoveAfterReadConsumerTest extends BaseS3 {
@@ -87,19 +82,18 @@ public class S3MoveAfterReadConsumerTest extends BaseS3 {
assertMockEndpointsSatisfied(10_000);
- //wait for finish
- Awaitility.await().atMost(10, TimeUnit.SECONDS).until(
- () -> {
- List<S3Object> results = template.request("direct:listObjects", new Processor() {
- @Override
- public void process(Exchange exchange) {
- exchange.getIn().setHeader(AWS2S3Constants.BUCKET_NAME, "already-read");
- exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.listObjects);
- }
- }).getMessage().getBody(List.class);
-
- return results.size() == 3 && "movedPrefixtest.txtmovedSuffix".equals(results.get(0).key());
- });
+ // wait for finish
+ Awaitility.await().atMost(10, TimeUnit.SECONDS).until(() -> {
+ List<S3Object> results = template.request("direct:listObjects", new Processor() {
+ @Override
+ public void process(Exchange exchange) {
+ exchange.getIn().setHeader(AWS2S3Constants.BUCKET_NAME, "already-read");
+ exchange.getIn().setHeader(AWS2S3Constants.S3_OPERATION, AWS2S3Operations.listObjects);
+ }
+ }).getMessage().getBody(List.class);
+
+ return results.size() == 3 && "movedPrefixtest.txtmovedSuffix".equals(results.get(0).key());
+ });
}
// *************************************
@@ -107,10 +101,10 @@ public class S3MoveAfterReadConsumerTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true";
+ final String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true";
return new RouteBuilder() {
@Override
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MultipartUploadOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MultipartUploadOperationTest.java
index 25c30c04505..4a8a9f4b07b 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MultipartUploadOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3MultipartUploadOperationTest.java
@@ -42,13 +42,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
//Based on S3MultipartUploadOperationIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3MultipartUploadOperationTest.class,
- S3MultipartUploadOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3MultipartUploadOperationTest.class,
+ S3MultipartUploadOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3MultipartUploadOperationTest extends BaseS3 {
@@ -86,8 +81,8 @@ public class S3MultipartUploadOperationTest extends BaseS3 {
});
S3Client s = AWSSDKClientUtils.newS3Client();
- ResponseInputStream<GetObjectResponse> response
- = s.getObject(GetObjectRequest.builder().bucket("mycamel").key("camel-content-type.txt").build());
+ ResponseInputStream<GetObjectResponse> response = s
+ .getObject(GetObjectRequest.builder().bucket("mycamel").key("camel-content-type.txt").build());
assertEquals("application/text", response.response().contentType());
}
@@ -96,7 +91,7 @@ public class S3MultipartUploadOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ObjectRangeOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ObjectRangeOperationTest.java
index ace7730351b..e0e0a834f3d 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ObjectRangeOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3ObjectRangeOperationTest.java
@@ -46,13 +46,8 @@ import java.nio.charset.StandardCharsets;
//Based on S3ObjectRangeOperationManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3ObjectRangeOperationTest.class,
- S3ObjectRangeOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3ObjectRangeOperationTest.class,
+ S3ObjectRangeOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3ObjectRangeOperationTest extends BaseS3 {
private static final Logger LOG = LoggerFactory.getLogger(S3ObjectRangeOperationTest.class);
@@ -73,7 +68,6 @@ public class S3ObjectRangeOperationTest extends BaseS3 {
}
});
-
template.send("direct:getObjectRange", new Processor() {
@Override
@@ -93,7 +87,7 @@ public class S3ObjectRangeOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3PojoAsBodyTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3PojoAsBodyTest.java
index 62690a06c66..751b1957e36 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3PojoAsBodyTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3PojoAsBodyTest.java
@@ -38,13 +38,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
//Based on S3CopyObjectOperationManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3PojoAsBodyTest.class,
- S3PojoAsBodyTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3PojoAsBodyTest.class,
+ S3PojoAsBodyTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3PojoAsBodyTest extends BaseS3 {
@@ -78,7 +73,7 @@ public class S3PojoAsBodyTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
@@ -86,7 +81,8 @@ public class S3PojoAsBodyTest extends BaseS3 {
public void configure() {
from("direct:send").to("aws2-s3://mycamel?autoCreateBucket=true");
- from("direct:list").to("aws2-s3://mycamel?autoCreateBucket=true&operation=listObjects&pojoRequest=true");
+ from("direct:list")
+ .to("aws2-s3://mycamel?autoCreateBucket=true&operation=listObjects&pojoRequest=true");
}
};
}
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3SimpleEncryptedUploadOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3SimpleEncryptedUploadOperationTest.java
index d5a026f0930..2a7c380c3d8 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3SimpleEncryptedUploadOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3SimpleEncryptedUploadOperationTest.java
@@ -41,13 +41,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
//Based on S3SimpleEncryptedUploadOperationIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3SimpleEncryptedUploadOperationTest.class,
- S3SimpleEncryptedUploadOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3SimpleEncryptedUploadOperationTest.class,
+ S3SimpleEncryptedUploadOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3SimpleEncryptedUploadOperationTest extends BaseS3 {
@@ -103,14 +98,15 @@ public class S3SimpleEncryptedUploadOperationTest extends BaseS3 {
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
@Override
public void configure() {
- String key = AWSSDKClientUtils.newKMSClient().createKey(CreateKeyRequest.builder().description("Test_key").build())
- .keyMetadata().keyId();
+ String key = AWSSDKClientUtils.newKMSClient()
+ .createKey(CreateKeyRequest.builder().description("Test_key").build()).keyMetadata()
+ .keyId();
String awsEndpoint = "aws2-s3://mycamel?autoCreateBucket=true&useAwsKMS=true&awsKMSKeyId=" + key;
from("direct:putObject").to(awsEndpoint);
diff --git a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3StreamUploadOperationTest.java b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3StreamUploadOperationTest.java
index b3da038626a..bf0166a1815 100644
--- a/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3StreamUploadOperationTest.java
+++ b/components-starter/camel-aws2-s3-starter/src/test/java/org/apache/camel/component/aws2/s3/S3StreamUploadOperationTest.java
@@ -39,17 +39,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
//based on S3StreamUploadOperationIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- S3StreamUploadOperationTest.class,
- S3StreamUploadOperationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, S3StreamUploadOperationTest.class,
+ S3StreamUploadOperationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class S3StreamUploadOperationTest extends BaseS3 {
-
@EndpointInject("mock:result")
private MockEndpoint result;
@@ -75,20 +69,18 @@ public class S3StreamUploadOperationTest extends BaseS3 {
assertEquals(40, resp.size());
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseS3.TestConfiguration {
+ public class TestConfiguration extends BaseS3.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(S3Client s3Client) {
return new RouteBuilder() {
@Override
public void configure() {
- String awsEndpoint1
- = "aws2-s3://mycamel-1?autoCreateBucket=true&streamingUploadMode=true&keyName=fileTest.txt&batchMessageNumber=25&namingStrategy=random";
+ String awsEndpoint1 = "aws2-s3://mycamel-1?autoCreateBucket=true&streamingUploadMode=true&keyName=fileTest.txt&batchMessageNumber=25&namingStrategy=random";
from("direct:stream1").to(awsEndpoint1).to("mock:result");
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsAdvancedConfigurationTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsAdvancedConfigurationTest.java
index 50ec626be31..8fb5d146f6a 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsAdvancedConfigurationTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsAdvancedConfigurationTest.java
@@ -38,13 +38,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
// Based on SnsTopicProducerIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsAdvancedConfigurationTest.class,
- SnsAdvancedConfigurationTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsAdvancedConfigurationTest.class,
+ SnsAdvancedConfigurationTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SnsAdvancedConfigurationTest extends BaseSns {
@@ -62,26 +57,28 @@ public class SnsAdvancedConfigurationTest extends BaseSns {
@Test
public void testFailure() {
- String uri = String.format("aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
+ String uri = String.format(
+ "aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
sharedNameGenerator.getName(), EmptyTestSnsConfiguration.class.getName());
- Assertions.assertThrows(ResolveEndpointFailedException.class, () -> producerTemplate.requestBody(uri, "test", String.class));
+ Assertions.assertThrows(ResolveEndpointFailedException.class,
+ () -> producerTemplate.requestBody(uri, "test", String.class));
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseSns.TestConfiguration {
+ public class TestConfiguration extends BaseSns.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start")
- .toF("aws2-sns://%s?amazonSNSClient=#secondClient&subject=The+subject+message&autoCreateTopic=true", sharedNameGenerator.getName());
+ from("direct:start").toF(
+ "aws2-sns://%s?amazonSNSClient=#secondClient&subject=The+subject+message&autoCreateTopic=true",
+ sharedNameGenerator.getName());
}
};
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentFifoTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentFifoTest.java
index 806b10d2677..0bcfcf18164 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentFifoTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsComponentFifoTest.java
@@ -36,13 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
// Based on SnsComponentFifoManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsComponentFifoTest.class,
- SnsComponentFifoTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsComponentFifoTest.class,
+ SnsComponentFifoTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SnsComponentFifoTest extends BaseSns {
@@ -75,15 +70,16 @@ public class SnsComponentFifoTest extends BaseSns {
// *************************************
@Configuration
- public class TestConfiguration extends BaseSns.TestConfiguration {
+ public class TestConfiguration extends BaseSns.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start")
- .toF("aws2-sns://%s.fifo?subject=The+subject+message&messageGroupIdStrategy=useExchangeId&autoCreateTopic=true", sharedNameGenerator.getName());
+ from("direct:start").toF(
+ "aws2-sns://%s.fifo?subject=The+subject+message&messageGroupIdStrategy=useExchangeId&autoCreateTopic=true",
+ sharedNameGenerator.getName());
}
};
}
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerCustomConfigTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerCustomConfigTest.java
index 933fcd37ce9..c743f63f44d 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerCustomConfigTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerCustomConfigTest.java
@@ -36,13 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
//Based on SnsTopicProducerCustomConfigIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsTopicProducerCustomConfigTest.class,
- SnsTopicProducerCustomConfigTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsTopicProducerCustomConfigTest.class,
+ SnsTopicProducerCustomConfigTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SnsTopicProducerCustomConfigTest extends BaseSns {
@@ -72,9 +67,11 @@ public class SnsTopicProducerCustomConfigTest extends BaseSns {
@Test
public void testFailure() {
- String uri = String.format("aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
+ String uri = String.format(
+ "aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
sharedNameGenerator.getName(), EmptyTestSnsConfiguration.class.getName());
- Assertions.assertThrows(ResolveEndpointFailedException.class, () -> producerTemplate.requestBody(uri, "test", String.class));
+ Assertions.assertThrows(ResolveEndpointFailedException.class,
+ () -> producerTemplate.requestBody(uri, "test", String.class));
}
// *************************************
@@ -89,9 +86,9 @@ public class SnsTopicProducerCustomConfigTest extends BaseSns {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start")
- .toF("aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
- sharedNameGenerator.getName(), TestSnsConfiguration.class.getName());
+ from("direct:start").toF(
+ "aws2-sns://%s?subject=The+subject+message&configuration=#class:%s&autoCreateTopic=true",
+ sharedNameGenerator.getName(), TestSnsConfiguration.class.getName());
}
};
}
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerTest.java
index 5f9701f431e..566418aa560 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerTest.java
@@ -37,13 +37,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
// Based on SnsTopicProducerIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsTopicProducerTest.class,
- SnsTopicProducerTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsTopicProducerTest.class,
+ SnsTopicProducerTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SnsTopicProducerTest extends BaseSns {
@@ -76,15 +71,15 @@ public class SnsTopicProducerTest extends BaseSns {
// *************************************
@Configuration
- public class TestConfiguration extends BaseSns.TestConfiguration {
+ public class TestConfiguration extends BaseSns.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start")
- .toF("aws2-sns://%s?subject=The+subject+message&autoCreateTopic=true", sharedNameGenerator.getName());
+ from("direct:start").toF("aws2-sns://%s?subject=The+subject+message&autoCreateTopic=true",
+ sharedNameGenerator.getName());
}
};
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerWithSubscriptionTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerWithSubscriptionTest.java
index b2a9a62785b..522174f810c 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerWithSubscriptionTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicProducerWithSubscriptionTest.java
@@ -55,13 +55,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
//Based on SnsTopicProducerWithSubscriptionIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsTopicProducerWithSubscriptionTest.class,
- SnsTopicProducerWithSubscriptionTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsTopicProducerWithSubscriptionTest.class,
+ SnsTopicProducerWithSubscriptionTest.TestConfiguration.class })
@Disabled("Need to review this later for localstack 2.x upgrade")
public class SnsTopicProducerWithSubscriptionTest extends BaseSns {
@@ -81,11 +76,8 @@ public class SnsTopicProducerWithSubscriptionTest extends BaseSns {
final int maxNumberOfMessages = 1;
int maxWaitTime = 10;
- final ReceiveMessageRequest request = ReceiveMessageRequest.builder()
- .queueUrl(sqsQueueSupplier.get())
- .waitTimeSeconds(maxWaitTime)
- .maxNumberOfMessages(maxNumberOfMessages)
- .build();
+ final ReceiveMessageRequest request = ReceiveMessageRequest.builder().queueUrl(sqsQueueSupplier.get())
+ .waitTimeSeconds(maxWaitTime).maxNumberOfMessages(maxNumberOfMessages).build();
while (true) {
ReceiveMessageResponse response = client.receiveMessage(request);
@@ -106,8 +98,6 @@ public class SnsTopicProducerWithSubscriptionTest extends BaseSns {
}
}
-
-
@Test
public void sendInOnly() {
Exchange exchange = producerTemplate.send("direct:start", ExchangePattern.InOnly, new Processor() {
@@ -124,35 +114,33 @@ public class SnsTopicProducerWithSubscriptionTest extends BaseSns {
assertEquals(1, messages.size(), "Did not receive as many messages as expected");
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseSns.TestConfiguration {
+ public class TestConfiguration extends BaseSns.TestConfiguration {
@Bean
public RouteBuilder routeBuilder(Supplier<String> queueSupplier) {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start")
- .toF("aws2-sns://%s?subject=The+subject+message&autoCreateTopic=true&subscribeSNStoSQS=true&queueUrl=%s",
- sharedNameGenerator.getName(), queueSupplier.get());
+ from("direct:start").toF(
+ "aws2-sns://%s?subject=The+subject+message&autoCreateTopic=true&subscribeSNStoSQS=true&queueUrl=%s",
+ sharedNameGenerator.getName(), queueSupplier.get());
}
};
}
@Bean(value = "sqsQueue")
public Supplier<String> sqsQueue() {
- SqsClient client = AWSSDKClientUtils.newSQSClient();;
+ SqsClient client = AWSSDKClientUtils.newSQSClient();
+ ;
String queue = sharedNameGenerator.getName() + "sqs";
- GetQueueUrlRequest getQueueUrlRequest = GetQueueUrlRequest.builder()
- .queueName(queue)
- .build();
+ GetQueueUrlRequest getQueueUrlRequest = GetQueueUrlRequest.builder().queueName(queue).build();
String sqsQueueUrl;
try {
@@ -160,9 +148,7 @@ public class SnsTopicProducerWithSubscriptionTest extends BaseSns {
sqsQueueUrl = getQueueUrlResult.queueUrl();
} catch (QueueDoesNotExistException e) {
- CreateQueueRequest createQueueRequest = CreateQueueRequest.builder()
- .queueName(queue)
- .build();
+ CreateQueueRequest createQueueRequest = CreateQueueRequest.builder().queueName(queue).build();
sqsQueueUrl = client.createQueue(createQueueRequest).queueUrl();
}
diff --git a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicWithKmsEncryptionTest.java b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicWithKmsEncryptionTest.java
index fb8adce6a17..360ddfc1ffb 100644
--- a/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicWithKmsEncryptionTest.java
+++ b/components-starter/camel-aws2-sns-starter/src/test/java/org/apache/camel/component/aws2/sns/SnsTopicWithKmsEncryptionTest.java
@@ -36,13 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
//Based on SnsTopicWithKmsEncryptionManualIT
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SnsTopicWithKmsEncryptionTest.class,
- SnsTopicWithKmsEncryptionTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SnsTopicWithKmsEncryptionTest.class,
+ SnsTopicWithKmsEncryptionTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SnsTopicWithKmsEncryptionTest extends BaseSns {
@@ -75,7 +70,7 @@ public class SnsTopicWithKmsEncryptionTest extends BaseSns {
// *************************************
@Configuration
- public class TestConfiguration extends BaseSns.TestConfiguration {
+ public class TestConfiguration extends BaseSns.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/BaseSqs.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/BaseSqs.java
index 0e3035f3cbc..732e1165514 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/BaseSqs.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/BaseSqs.java
@@ -66,9 +66,10 @@ public class BaseSqs {
}
String receiveMessageFromQueue(String queueName, boolean deleteMessage) {
- return consumerTemplate.receiveBody(String.format("aws2-sqs://%s?deleteAfterRead=%s&deleteIfFiltered=%s&defaultVisibilityTimeout=0", queueName, deleteMessage, deleteMessage),
- 10000,
- String.class);
+ return consumerTemplate.receiveBody(
+ String.format("aws2-sqs://%s?deleteAfterRead=%s&deleteIfFiltered=%s&defaultVisibilityTimeout=0",
+ queueName, deleteMessage, deleteMessage),
+ 10000, String.class);
}
// *************************************
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/JmsStyleSelectorTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/JmsStyleSelectorTest.java
index 6ae5c6b95fa..98b8d5e878a 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/JmsStyleSelectorTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/JmsStyleSelectorTest.java
@@ -40,17 +40,11 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- JmsStyleSelectorTest.class,
- JmsStyleSelectorTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, JmsStyleSelectorTest.class,
+ JmsStyleSelectorTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class JmsStyleSelectorTest extends BaseSqs {
-
@EndpointInject("direct:start")
private ProducerTemplate template;
@@ -81,19 +75,18 @@ public class JmsStyleSelectorTest extends BaseSqs {
// *************************************
@Configuration
- public class TestConfiguration extends BaseSqs.TestConfiguration {
+ public class TestConfiguration extends BaseSqs.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").startupOrder(2).toF("aws2-sqs://%s?autoCreateQueue=true", sharedNameGenerator.getName());
+ from("direct:start").startupOrder(2).toF("aws2-sqs://%s?autoCreateQueue=true",
+ sharedNameGenerator.getName());
fromF("aws2-sqs://%s?deleteAfterRead=false&deleteIfFiltered=true&autoCreateQueue=true",
- sharedNameGenerator.getName())
- .startupOrder(1)
- .filter(simple("${body} != 'ignore'")).log("${body}").log("${header.CamelAwsSqsReceiptHandle}")
- .to("mock:result");
+ sharedNameGenerator.getName()).startupOrder(1).filter(simple("${body} != 'ignore'"))
+ .log("${body}").log("${header.CamelAwsSqsReceiptHandle}").to("mock:result");
}
};
}
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
index f97cdd1614c..52329660c67 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsComponentTest.java
@@ -30,7 +30,7 @@ import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
-import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import static org.junit.jupiter.api.Assertions.assertEquals;
@@ -38,13 +38,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SqsComponentTest.class,
- SqsComponentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SqsComponentTest.class,
+ SqsComponentTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SqsComponentTest extends BaseSqs {
@@ -102,20 +97,18 @@ public class SqsComponentTest extends BaseSqs {
assertEquals("6a1559560f67c5e7a7d5d838bf0272ee", exchange.getMessage().getHeader(Sqs2Constants.MD5_OF_BODY));
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseSqs.TestConfiguration {
+ public class TestConfiguration extends BaseSqs.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String sqsEndpointUri = String
- .format("aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
- sharedNameGenerator.getName(),
- "1209600", "65536", "60",
- "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
+ final String sqsEndpointUri = String.format(
+ "aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
+ sharedNameGenerator.getName(), "1209600", "65536", "60",
+ "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
return new RouteBuilder() {
@Override
public void configure() {
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDeadletterTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDeadletterTest.java
index 3f3a83d30e2..ca0fdc91aba 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDeadletterTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDeadletterTest.java
@@ -35,13 +35,8 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SqsDeadletterTest.class,
- SqsDeadletterTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SqsDeadletterTest.class,
+ SqsDeadletterTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SqsDeadletterTest extends BaseSqs {
@@ -73,11 +68,10 @@ public class SqsDeadletterTest extends BaseSqs {
@Bean
public RouteBuilder routeBuilder() {
- final String sqsEndpointUri = String
- .format("aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
- sharedNameGenerator.getName(),
- "1209600", "65536", "60",
- "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
+ final String sqsEndpointUri = String.format(
+ "aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
+ sharedNameGenerator.getName(), "1209600", "65536", "60",
+ "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
return new RouteBuilder() {
@Override
public void configure() {
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDelayedQueueTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDelayedQueueTest.java
index 3ef74193681..43c5bd8c69a 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDelayedQueueTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsDelayedQueueTest.java
@@ -39,13 +39,7 @@ import static org.hamcrest.Matchers.is;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SqsDelayedQueueTest.class,
- BaseSqs.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SqsDelayedQueueTest.class, BaseSqs.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
/**
* Based on camel-quarkus Aws2SqsTest#sqsAutoCreateDelayedQueue
@@ -62,15 +56,13 @@ public class SqsDelayedQueueTest extends BaseSqs {
public void delayedQueue() throws Exception {
int delay = 20;
String delayedQueueuName = sharedNameGenerator.getName() + "_delayed";
- Instant start = Instant.now();
- //create delayed queue
- List<String> queues = producerTemplate
- .requestBody(
- String.format("aws2-sqs://%s?autoCreateQueue=true&delayQueue=true&delaySeconds=%d&operation=listQueues", delayedQueueuName, delay),
- null,
- ListQueuesResponse.class)
- .queueUrls();
-
+ Instant start = Instant.now();
+ // create delayed queue
+ List<String> queues = producerTemplate.requestBody(
+ String.format("aws2-sqs://%s?autoCreateQueue=true&delayQueue=true&delaySeconds=%d&operation=listQueues",
+ delayedQueueuName, delay),
+ null, ListQueuesResponse.class).queueUrls();
+
String msg = sendSingleMessageToQueue(delayedQueueuName);
awaitMessageWithExpectedContentFromQueue(msg, delayedQueueuName);
@@ -78,8 +70,8 @@ public class SqsDelayedQueueTest extends BaseSqs {
}
private void awaitMessageWithExpectedContentFromQueue(String expectedContent, String queueName) {
- Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(120, TimeUnit.SECONDS).until(
- () -> expectedContent.equals(receiveMessageFromQueue(queueName, false)));
+ Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(120, TimeUnit.SECONDS)
+ .until(() -> expectedContent.equals(receiveMessageFromQueue(queueName, false)));
}
}
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsOperationsTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsOperationsTest.java
index 767bc7cc3b3..4f8b0872017 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsOperationsTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsOperationsTest.java
@@ -51,29 +51,21 @@ import java.util.concurrent.TimeUnit;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SqsOperationsTest.class,
- SqsOperationsTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SqsOperationsTest.class,
+ SqsOperationsTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
-class SqsOperationsTest extends BaseSqs {
+class SqsOperationsTest extends BaseSqs {
- private static final String queueName = "Aws2SqsTest_queue_" + RandomStringUtils.randomAlphanumeric(49).toLowerCase(Locale.ROOT);
+ private static final String queueName = "Aws2SqsTest_queue_"
+ + RandomStringUtils.randomAlphanumeric(49).toLowerCase(Locale.ROOT);
private static String queueUrl;
@BeforeAll
- protected static void setupResources() {
+ protected static void setupResources() {
final SqsClient sqsClient = AWSSDKClientUtils.newSQSClient();
{
- queueUrl = sqsClient.createQueue(
- CreateQueueRequest.builder()
- .queueName(queueName)
- .build())
- .queueUrl();
+ queueUrl = sqsClient.createQueue(CreateQueueRequest.builder().queueName(queueName).build()).queueUrl();
}
}
@@ -90,7 +82,6 @@ class SqsOperationsTest extends BaseSqs {
Assertions.assertNull(receiveMessageFromQueue(queueName, false));
}
-
@Test
void simpleInOut() {
Assertions.assertTrue(clientListQueues().stream().distinct().anyMatch(u -> u.contains(queueName)));
@@ -119,69 +110,57 @@ class SqsOperationsTest extends BaseSqs {
@Test
void sqsSendBatchMessage() {
- final List<String> messages = new ArrayList<>(Arrays.asList(
- "Hello from camel-quarkus",
- "This is a batch message test",
- "Let's add few more messages",
- "Next message will be last",
- "Goodbye from camel-quarkus"));
+ final List<String> messages = new ArrayList<>(
+ Arrays.asList("Hello from camel-quarkus", "This is a batch message test", "Let's add few more messages",
+ "Next message will be last", "Goodbye from camel-quarkus"));
Assertions.assertEquals(messages.size(), sendMessageBatchAndRetrieveSuccessCount(queueName, messages));
}
// helper methods
private void purgeQueue(String queueName) {
- producerTemplate.sendBodyAndHeader("aws2-sqs://" + queueName + "?operation=purgeQueue",
- null,
- Sqs2Constants.SQS_QUEUE_PREFIX,
- queueName);
+ producerTemplate.sendBodyAndHeader("aws2-sqs://" + queueName + "?operation=purgeQueue", null,
+ Sqs2Constants.SQS_QUEUE_PREFIX, queueName);
}
private int sendMessageBatchAndRetrieveSuccessCount(String queueName, List<String> messages) {
- return producerTemplate.requestBody(
- "aws2-sqs://" + queueName + "?operation=sendBatchMessage",
- messages,
+ return producerTemplate.requestBody("aws2-sqs://" + queueName + "?operation=sendBatchMessage", messages,
SendMessageBatchResponse.class).successful().size();
}
private List<String> clientListQueues() {
- return producerTemplate.requestBody("aws2-sqs://" + queueName + "?operation=listQueues", null, ListQueuesResponse.class)
+ return producerTemplate
+ .requestBody("aws2-sqs://" + queueName + "?operation=listQueues", null, ListQueuesResponse.class)
.queueUrls();
}
-
-
private String receiveReceipt(String queueName) {
Exchange exchange = consumerTemplate.receive("aws2-sqs://" + queueName, 5000);
return exchange.getIn().getHeader(Sqs2Constants.RECEIPT_HANDLE, String.class);
}
private void awaitMessageWithExpectedContentFromQueue(String expectedContent, String queueName) {
- Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS).until(
- () -> expectedContent.equals(receiveMessageFromQueue(queueName, true)));
+ Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(10, TimeUnit.SECONDS)
+ .until(() -> expectedContent.equals(receiveMessageFromQueue(queueName, true)));
}
private void deleteMessageFromQueue(String queueName, String receipt) {
- producerTemplate.sendBodyAndHeader("aws2-sqs://" + queueName + "?operation=deleteMessage",
- null,
- Sqs2Constants.RECEIPT_HANDLE,
- URLDecoder.decode(receipt, StandardCharsets.UTF_8));
+ producerTemplate.sendBodyAndHeader("aws2-sqs://" + queueName + "?operation=deleteMessage", null,
+ Sqs2Constants.RECEIPT_HANDLE, URLDecoder.decode(receipt, StandardCharsets.UTF_8));
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseSqs.TestConfiguration {
+ public class TestConfiguration extends BaseSqs.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String sqsEndpointUri = String
- .format("aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
- sharedNameGenerator.getName(),
- "1209600", "65536", "60",
- "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
+ final String sqsEndpointUri = String.format(
+ "aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
+ sharedNameGenerator.getName(), "1209600", "65536", "60",
+ "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
return new RouteBuilder() {
@Override
public void configure() {
diff --git a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerAutoCreateQueueTest.java b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerAutoCreateQueueTest.java
index 14073c91364..58c9f73c5fb 100644
--- a/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerAutoCreateQueueTest.java
+++ b/components-starter/camel-aws2-sqs-starter/src/test/java/org/apache/camel/component/aws2/sqs/SqsProducerAutoCreateQueueTest.java
@@ -42,13 +42,8 @@ import java.util.Collection;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SqsProducerAutoCreateQueueTest.class,
- SqsProducerAutoCreateQueueTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SqsProducerAutoCreateQueueTest.class,
+ SqsProducerAutoCreateQueueTest.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class SqsProducerAutoCreateQueueTest extends BaseSqs {
@@ -91,22 +86,22 @@ public class SqsProducerAutoCreateQueueTest extends BaseSqs {
// *************************************
@Configuration
- public class TestConfiguration extends BaseSqs.TestConfiguration {
+ public class TestConfiguration extends BaseSqs.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
- final String sqsEndpointUri = String
- .format("aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
- sharedNameGenerator.getName(),
- "1209600", "65536", "60",
- "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
+ final String sqsEndpointUri = String.format(
+ "aws2-sqs://%s?messageRetentionPeriod=%s&maximumMessageSize=%s&visibilityTimeout=%s&policy=%s&autoCreateQueue=true",
+ sharedNameGenerator.getName(), "1209600", "65536", "60",
+ "file:src/test/resources/org/apache/camel/component/aws2/sqs/policy.txt");
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:start").startupOrder(2).setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage"))
+ from("direct:start").startupOrder(2)
+ .setHeader(Sqs2Constants.SQS_OPERATION, constant("sendBatchMessage"))
.toF("aws2-sqs://%s?autoCreateQueue=true", "queue-2001");
- fromF("aws2-sqs://%s?deleteAfterRead=true&autoCreateQueue=true", "queue-2001")
- .startupOrder(1).log("${body}").to("mock:result");
+ fromF("aws2-sqs://%s?deleteAfterRead=true&autoCreateQueue=true", "queue-2001").startupOrder(1)
+ .log("${body}").to("mock:result");
}
};
}
diff --git a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConverter.java b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConverter.java
index 02af6602fc5..886e3da2aed 100644
--- a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConverter.java
+++ b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/bean/springboot/BeanComponentConverter.java
@@ -25,9 +25,7 @@ import org.springframework.core.convert.converter.GenericConverter;
/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
-public class BeanComponentConverter
- implements
- org.springframework.core.convert.converter.GenericConverter {
+public class BeanComponentConverter implements org.springframework.core.convert.converter.GenericConverter {
private final CamelContext camelContext;
@@ -41,10 +39,7 @@ public class BeanComponentConverter
return answer;
}
- public Object convert(
- Object source,
- TypeDescriptor sourceType,
- TypeDescriptor targetType) {
+ public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return null;
}
@@ -54,7 +49,8 @@ public class BeanComponentConverter
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
- case "org.apache.camel.BeanScope": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.BeanScope.class);
+ case "org.apache.camel.BeanScope":
+ return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.BeanScope.class);
}
return null;
}
diff --git a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConverter.java b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConverter.java
index 7b16496fe35..4d02b859d84 100644
--- a/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConverter.java
+++ b/components-starter/camel-bean-starter/src/main/java/org/apache/camel/component/beanclass/springboot/ClassComponentConverter.java
@@ -25,9 +25,7 @@ import org.springframework.core.convert.converter.GenericConverter;
/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
-public class ClassComponentConverter
- implements
- org.springframework.core.convert.converter.GenericConverter {
+public class ClassComponentConverter implements org.springframework.core.convert.converter.GenericConverter {
private final CamelContext camelContext;
@@ -41,10 +39,7 @@ public class ClassComponentConverter
return answer;
}
- public Object convert(
- Object source,
- TypeDescriptor sourceType,
- TypeDescriptor targetType) {
+ public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return null;
}
@@ -54,7 +49,8 @@ public class ClassComponentConverter
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
- case "org.apache.camel.BeanScope": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.BeanScope.class);
+ case "org.apache.camel.BeanScope":
+ return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.BeanScope.class);
}
return null;
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentBeanRefIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentBeanRefIT.java
index 0c01a176f10..56379b472ef 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentBeanRefIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentBeanRefIT.java
@@ -16,9 +16,6 @@
*/
package org.apache.camel.component.cassandra.integration;
-
-
-
import com.datastax.oss.driver.api.core.CqlSession;
import org.apache.camel.builder.RouteBuilder;
@@ -38,16 +35,10 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraComponentBeanRefIT.class,
- CassandraComponentBeanRefIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraComponentBeanRefIT.class,
+ CassandraComponentBeanRefIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraComponentBeanRefIT extends BaseCassandra {
@@ -56,17 +47,13 @@ public class CassandraComponentBeanRefIT extends BaseCassandra {
@Bean("cassandraSession")
protected CqlSession createSession() {
-
+
return getSession();
}
-
-
-
@Test
public void testSession() {
-
-
+
CassandraEndpoint endpoint = context.getEndpoint(SESSION_URI, CassandraEndpoint.class);
assertNotNull(endpoint, "No endpoint found for uri: " + SESSION_URI);
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentConsumerIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentConsumerIT.java
index d90c143d9b3..3badd4111db 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentConsumerIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentConsumerIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.cassandra.integration;
-
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -41,34 +40,27 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraComponentConsumerIT.class,
- CassandraComponentConsumerIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraComponentConsumerIT.class,
+ CassandraComponentConsumerIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraComponentConsumerIT extends BaseCassandra {
static final String CQL = "select login, first_name, last_name from camel_user";
-
+
@EndpointInject("mock:resultAll")
MockEndpoint mock;
-
+
@EndpointInject("mock:resultUnprepared")
MockEndpoint mockResulutUnprepared;
@EndpointInject("mock:resultOne")
MockEndpoint mockResulutOne;
-
@Test
public void testConsumeAll() throws Exception {
-
+
mock.expectedMinimumMessageCount(1);
mock.whenAnyExchangeReceived(new Processor() {
@Override
@@ -83,7 +75,7 @@ public class CassandraComponentConsumerIT extends BaseCassandra {
@Test
public void testConsumeUnprepared() throws Exception {
-
+
mockResulutUnprepared.expectedMinimumMessageCount(1);
mockResulutUnprepared.whenAnyExchangeReceived(new Processor() {
@Override
@@ -98,7 +90,7 @@ public class CassandraComponentConsumerIT extends BaseCassandra {
@Test
public void testConsumeOne() throws Exception {
-
+
mockResulutOne.expectedMinimumMessageCount(1);
mockResulutOne.whenAnyExchangeReceived(new Processor() {
@Override
@@ -127,8 +119,8 @@ public class CassandraComponentConsumerIT extends BaseCassandra {
from(String.format("cql://%s/%s?cql=%s", getUrl(), KEYSPACE_NAME, CQL)).to("mock:resultAll");
from(String.format("cql://%s/%s?cql=%s&prepareStatements=false", getUrl(), KEYSPACE_NAME, CQL))
.to("mock:resultUnprepared");
- from(String.format("cql://%s/%s?cql=%s&resultSetConversionStrategy=ONE", getUrl(), KEYSPACE_NAME, CQL))
- .to("mock:resultOne");
+ from(String.format("cql://%s/%s?cql=%s&resultSetConversionStrategy=ONE", getUrl(), KEYSPACE_NAME,
+ CQL)).to("mock:resultOne");
}
};
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerIT.java
index 98500c28329..bb35ad654a9 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.cassandra.integration;
-
import static com.datastax.oss.driver.api.querybuilder.QueryBuilder.bindMarker;
import java.util.Arrays;
@@ -29,7 +28,6 @@ import com.datastax.oss.driver.api.core.cql.Row;
import com.datastax.oss.driver.api.querybuilder.QueryBuilder;
import com.datastax.oss.driver.api.querybuilder.update.Update;
-
import org.apache.camel.Produce;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
@@ -46,7 +44,6 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertInstanceOf;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-
import org.junit.jupiter.api.condition.DisabledIfSystemProperty;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
@@ -54,16 +51,10 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraComponentProducerIT.class,
- CassandraComponentProducerIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraComponentProducerIT.class,
+ CassandraComponentProducerIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraComponentProducerIT extends BaseCassandra {
@@ -84,14 +75,13 @@ public class CassandraComponentProducerIT extends BaseCassandra {
@Produce("direct:inputNoEndpointCql")
ProducerTemplate producerTemplateNoEndpointCql;
-
@Test
public void testRequestUriCql() {
producerTemplate.requestBody(Arrays.asList("w_jiang", "Willem", "Jiang"));
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "w_jiang"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "w_jiang"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Willem", row.getString("first_name"));
@@ -116,11 +106,11 @@ public class CassandraComponentProducerIT extends BaseCassandra {
@Test
public void testRequestMessageCql() {
- producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" }, CassandraConstants.CQL_QUERY,
- "update camel_user set first_name=?, last_name=? where login=?");
+ producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" },
+ CassandraConstants.CQL_QUERY, "update camel_user set first_name=?, last_name=? where login=?");
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Claus 2", row.getString("first_name"));
@@ -130,11 +120,10 @@ public class CassandraComponentProducerIT extends BaseCassandra {
@Test
public void testLoadBalancing() {
loadBalancingPolicyTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" },
- CassandraConstants.CQL_QUERY,
- "update camel_user set first_name=?, last_name=? where login=?");
+ CassandraConstants.CQL_QUERY, "update camel_user set first_name=?, last_name=? where login=?");
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Claus 2", row.getString("first_name"));
@@ -149,15 +138,13 @@ public class CassandraComponentProducerIT extends BaseCassandra {
@Test
public void testRequestMessageStatement() {
- Update update = QueryBuilder.update("camel_user")
- .setColumn("first_name", bindMarker())
- .setColumn("last_name", bindMarker())
- .whereColumn("login").isEqualTo(bindMarker());
- producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" }, CassandraConstants.CQL_QUERY,
- update.build());
+ Update update = QueryBuilder.update("camel_user").setColumn("first_name", bindMarker())
+ .setColumn("last_name", bindMarker()).whereColumn("login").isEqualTo(bindMarker());
+ producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" },
+ CassandraConstants.CQL_QUERY, update.build());
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Claus 2", row.getString("first_name"));
@@ -170,27 +157,25 @@ public class CassandraComponentProducerIT extends BaseCassandra {
*/
@Test
public void testEndpointNoCqlParameter() {
- Update update = QueryBuilder.update("camel_user")
- .setColumn("first_name", bindMarker())
- .whereColumn("login").isEqualTo(bindMarker());
- producerTemplateNoEndpointCql.sendBodyAndHeader(new Object[] { "Claus 2", "c_ibsen" }, CassandraConstants.CQL_QUERY,
- update.build());
-
- ResultSet resultSet1 = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ Update update = QueryBuilder.update("camel_user").setColumn("first_name", bindMarker()).whereColumn("login")
+ .isEqualTo(bindMarker());
+ producerTemplateNoEndpointCql.sendBodyAndHeader(new Object[] { "Claus 2", "c_ibsen" },
+ CassandraConstants.CQL_QUERY, update.build());
+
+ ResultSet resultSet1 = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row1 = resultSet1.one();
assertNotNull(row1);
assertEquals("Claus 2", row1.getString("first_name"));
assertEquals("Ibsen", row1.getString("last_name"));
- update = QueryBuilder.update("camel_user")
- .setColumn("last_name", bindMarker())
- .whereColumn("login").isEqualTo(bindMarker());
- producerTemplateNoEndpointCql.sendBodyAndHeader(new Object[] { "Ibsen 2", "c_ibsen" }, CassandraConstants.CQL_QUERY,
- update.build());
+ update = QueryBuilder.update("camel_user").setColumn("last_name", bindMarker()).whereColumn("login")
+ .isEqualTo(bindMarker());
+ producerTemplateNoEndpointCql.sendBodyAndHeader(new Object[] { "Ibsen 2", "c_ibsen" },
+ CassandraConstants.CQL_QUERY, update.build());
- ResultSet resultSet2 = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet2 = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row2 = resultSet2.one();
assertNotNull(row2);
assertEquals("Claus 2", row2.getString("first_name"));
@@ -199,9 +184,9 @@ public class CassandraComponentProducerIT extends BaseCassandra {
@Test
public void testRequestNotConsistent() {
- CassandraEndpoint endpoint
- = context.getEndpoint(String.format("cql://%s/%s?cql=%s&consistencyLevel=ANY", getUrl(), KEYSPACE_NAME, CQL),
- CassandraEndpoint.class);
+ CassandraEndpoint endpoint = context.getEndpoint(
+ String.format("cql://%s/%s?cql=%s&consistencyLevel=ANY", getUrl(), KEYSPACE_NAME, CQL),
+ CassandraEndpoint.class);
assertEquals(ConsistencyLevel.ANY, endpoint.getConsistencyLevel());
notConsistentProducerTemplate.requestBody(Arrays.asList("j_anstey", "Jonathan", "Anstey"));
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerUnpreparedIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerUnpreparedIT.java
index 5c0f9f42e2b..b9676f0b9da 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerUnpreparedIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/integration/CassandraComponentProducerUnpreparedIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.cassandra.integration;
-
import static com.datastax.oss.driver.api.querybuilder.QueryBuilder.literal;
import java.util.Arrays;
@@ -47,38 +46,28 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraComponentProducerUnpreparedIT.class,
- CassandraComponentProducerUnpreparedIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraComponentProducerUnpreparedIT.class,
+ CassandraComponentProducerUnpreparedIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraComponentProducerUnpreparedIT extends BaseCassandra {
static final String CQL = "insert into camel_user(login, first_name, last_name) values (?, ?, ?)";
static final String NO_PARAMETER_CQL = "select login, first_name, last_name from camel_user";
-
-
-
@Produce("direct:input")
ProducerTemplate producerTemplate;
@Produce("direct:inputNoParameter")
ProducerTemplate noParameterProducerTemplate;
-
@Test
public void testRequestUriCql() {
producerTemplate.requestBody(Arrays.asList("w_jiang", "Willem", "Jiang"));
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "w_jiang"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "w_jiang"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Willem", row.getString("first_name"));
@@ -103,11 +92,11 @@ public class CassandraComponentProducerUnpreparedIT extends BaseCassandra {
@Test
public void testRequestMessageCql() {
- producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" }, CassandraConstants.CQL_QUERY,
- "update camel_user set first_name=?, last_name=? where login=?");
+ producerTemplate.requestBodyAndHeader(new Object[] { "Claus 2", "Ibsen 2", "c_ibsen" },
+ CassandraConstants.CQL_QUERY, "update camel_user set first_name=?, last_name=? where login=?");
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Claus 2", row.getString("first_name"));
@@ -119,21 +108,18 @@ public class CassandraComponentProducerUnpreparedIT extends BaseCassandra {
*/
@Test
public void testRequestMessageStatement() {
- Update update = QueryBuilder.update("camel_user")
- .setColumn("first_name", literal("Claus 2"))
- .setColumn("last_name", literal("Ibsen 2"))
- .whereColumn("login").isEqualTo(literal("c_ibsen"));
+ Update update = QueryBuilder.update("camel_user").setColumn("first_name", literal("Claus 2"))
+ .setColumn("last_name", literal("Ibsen 2")).whereColumn("login").isEqualTo(literal("c_ibsen"));
producerTemplate.requestBodyAndHeader(null, CassandraConstants.CQL_QUERY, update.build());
- ResultSet resultSet = getSession()
- .execute(String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
+ ResultSet resultSet = getSession().execute(
+ String.format("select login, first_name, last_name from camel_user where login = '%s'", "c_ibsen"));
Row row = resultSet.one();
assertNotNull(row);
assertEquals("Claus 2", row.getString("first_name"));
assertEquals("Ibsen 2", row.getString("last_name"));
}
-
// *************************************
// Config
// *************************************
@@ -147,10 +133,10 @@ public class CassandraComponentProducerUnpreparedIT extends BaseCassandra {
@Override
public void configure() {
- from("direct:input")
- .to(String.format("cql://%s/%s?cql=%s&prepareStatements=false", getUrl(), KEYSPACE_NAME, CQL));
- from("direct:inputNoParameter").to(
- String.format("cql://%s/%s?cql=%s&prepareStatements=false", getUrl(), KEYSPACE_NAME, NO_PARAMETER_CQL));
+ from("direct:input").to(
+ String.format("cql://%s/%s?cql=%s&prepareStatements=false", getUrl(), KEYSPACE_NAME, CQL));
+ from("direct:inputNoParameter").to(String.format("cql://%s/%s?cql=%s&prepareStatements=false",
+ getUrl(), KEYSPACE_NAME, NO_PARAMETER_CQL));
}
};
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/springboot/BaseCassandra.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/springboot/BaseCassandra.java
index 3f2fb61f30e..68c79dfddd1 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/springboot/BaseCassandra.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/component/cassandra/springboot/BaseCassandra.java
@@ -35,10 +35,10 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.extension.RegisterExtension;
public class BaseCassandra {
-
+
@Autowired
protected CamelContext context;
-
+
@Autowired
protected ProducerTemplate template;
@@ -53,16 +53,14 @@ public class BaseCassandra {
static {
service = new CassandraLocalContainerService();
- service.getContainer()
- .withInitScript("initScript.cql")
- .withNetworkAliases("cassandra");
-
+ service.getContainer().withInitScript("initScript.cql").withNetworkAliases("cassandra");
+
}
@BeforeEach
public void beforeEach() throws Exception {
- executeScript("BasicDataSet.cql");
-
+ executeScript("BasicDataSet.cql");
+
}
public void executeScript(String pathToScript) throws IOException {
@@ -81,7 +79,7 @@ public class BaseCassandra {
@AfterEach
protected void doPostTearDown() throws Exception {
-
+
try {
if (session != null) {
session.close();
@@ -94,12 +92,9 @@ public class BaseCassandra {
public CqlSession getSession() {
if (session == null) {
- InetSocketAddress endpoint
- = new InetSocketAddress(service.getCassandraHost(), service.getCQL3Port());
- //create a new session
- session = CqlSession.builder()
- .withLocalDatacenter(DATACENTER_NAME)
- .withKeyspace(KEYSPACE_NAME)
+ InetSocketAddress endpoint = new InetSocketAddress(service.getCassandraHost(), service.getCQL3Port());
+ // create a new session
+ session = CqlSession.builder().withLocalDatacenter(DATACENTER_NAME).withKeyspace(KEYSPACE_NAME)
.withConfigLoader(DriverConfigLoader.programmaticBuilder()
.withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(5)).build())
.addContactPoint(endpoint).build();
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationIT.java
index 1963c624bfc..72da6f8139e 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.aggregate.cassandra;
-
import org.apache.camel.AggregationStrategy;
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
@@ -36,22 +35,15 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraAggregationIT.class,
- CassandraAggregationIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraAggregationIT.class,
+ CassandraAggregationIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraAggregationIT extends BaseCassandra {
CassandraAggregationRepository aggregationRepository;
-
@EndpointInject("mock:output")
MockEndpoint mockOutput;
@@ -63,10 +55,9 @@ public class CassandraAggregationIT extends BaseCassandra {
}
-
@AfterEach
public void tearDown() throws Exception {
-
+
aggregationRepository.stop();
}
@@ -77,7 +68,7 @@ public class CassandraAggregationIT extends BaseCassandra {
@Test
public void testAggregationRoute() throws Exception {
// Given
-
+
mockOutput.expectedMessageCount(2);
mockOutput.expectedBodiesReceivedInAnyOrder("A,C,E", "B,D");
// When
@@ -89,7 +80,6 @@ public class CassandraAggregationIT extends BaseCassandra {
// Then
mockOutput.assertIsSatisfied(4000L);
}
-
// *************************************
// Config
@@ -116,8 +106,7 @@ public class CassandraAggregationIT extends BaseCassandra {
}
};
from("direct:input").aggregate(header("aggregationId"), aggregationStrategy).completionSize(3)
- .completionTimeout(3000L).aggregationRepository(aggregationRepository)
- .to("mock:output");
+ .completionTimeout(3000L).aggregationRepository(aggregationRepository).to("mock:output");
}
};
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationRepositoryIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationRepositoryIT.java
index 0106725d7ce..940d6bd93f0 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationRepositoryIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationRepositoryIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.aggregate.cassandra;
-
import java.util.Set;
import org.apache.camel.EndpointInject;
@@ -41,21 +40,14 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraAggregationRepositoryIT.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraAggregationRepositoryIT.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraAggregationRepositoryIT extends BaseCassandra {
CassandraAggregationRepository aggregationRepository;
-
@EndpointInject("mock:output")
MockEndpoint mockOutput;
@@ -63,7 +55,7 @@ public class CassandraAggregationRepositoryIT extends BaseCassandra {
protected void doPreSetup() throws Exception {
aggregationRepository = new CassandraAggregationRepository(getSession());
aggregationRepository.start();
-
+
}
@AfterEach
@@ -72,7 +64,8 @@ public class CassandraAggregationRepositoryIT extends BaseCassandra {
}
private boolean exists(String key) {
- return getSession().execute(String.format("select KEY from CAMEL_AGGREGATION where KEY='%s'", key)).one() != null;
+ return getSession().execute(String.format("select KEY from CAMEL_AGGREGATION where KEY='%s'", key))
+ .one() != null;
}
@Test
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationSerializedHeadersIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationSerializedHeadersIT.java
index 592a2bbc2aa..c7daf242263 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationSerializedHeadersIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/CassandraAggregationSerializedHeadersIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.aggregate.cassandra;
-
import org.apache.camel.AggregationStrategy;
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
@@ -37,22 +36,15 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraAggregationSerializedHeadersIT.class,
- CassandraAggregationSerializedHeadersIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraAggregationSerializedHeadersIT.class,
+ CassandraAggregationSerializedHeadersIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraAggregationSerializedHeadersIT extends BaseCassandra {
CassandraAggregationRepository aggregationRepository;
-
@EndpointInject("mock:output")
MockEndpoint mockOutput;
@@ -65,10 +57,9 @@ public class CassandraAggregationSerializedHeadersIT extends BaseCassandra {
}
-
@AfterEach
public void tearDown() throws Exception {
-
+
aggregationRepository.stop();
}
@@ -79,7 +70,7 @@ public class CassandraAggregationSerializedHeadersIT extends BaseCassandra {
@Test
public void testAggregationRoute() throws Exception {
// Given
-
+
mockOutput.expectedMessageCount(2);
mockOutput.expectedBodiesReceivedInAnyOrder("A,C,E", "B,D");
HeaderDto dto1 = new HeaderDto("org", "company", 1);
@@ -94,7 +85,6 @@ public class CassandraAggregationSerializedHeadersIT extends BaseCassandra {
mockOutput.assertIsSatisfied(4000L);
}
-
// *************************************
// Config
@@ -121,8 +111,7 @@ public class CassandraAggregationSerializedHeadersIT extends BaseCassandra {
}
};
from("direct:input").aggregate(header("aggregationId"), aggregationStrategy).completionSize(3)
- .completionTimeout(3000L).aggregationRepository(aggregationRepository)
- .to("mock:output");
+ .completionTimeout(3000L).aggregationRepository(aggregationRepository).to("mock:output");
}
};
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/NamedCassandraAggregationRepositoryIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/NamedCassandraAggregationRepositoryIT.java
index 548a9369772..cc167d2e830 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/NamedCassandraAggregationRepositoryIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/aggregate/cassandra/NamedCassandraAggregationRepositoryIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.aggregate.cassandra;
-
import java.util.Set;
import org.apache.camel.EndpointInject;
@@ -41,21 +40,14 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- NamedCassandraAggregationRepositoryIT.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, NamedCassandraAggregationRepositoryIT.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class NamedCassandraAggregationRepositoryIT extends BaseCassandra {
CassandraAggregationRepository aggregationRepository;
-
@EndpointInject("mock:output")
MockEndpoint mockOutput;
@@ -67,17 +59,16 @@ public class NamedCassandraAggregationRepositoryIT extends BaseCassandra {
}
-
@AfterEach
public void tearDown() throws Exception {
-
+
aggregationRepository.stop();
}
private boolean exists(String key) {
- return getSession().execute(String.format("select KEY from NAMED_CAMEL_AGGREGATION where NAME='ID' and KEY='%s'", key))
- .one()
- != null;
+ return getSession()
+ .execute(String.format("select KEY from NAMED_CAMEL_AGGREGATION where NAME='ID' and KEY='%s'", key))
+ .one() != null;
}
@Test
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentIT.java
index cda333d4748..752171d8cd4 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.idempotent.cassandra;
-
import org.apache.camel.EndpointInject;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.cassandra.springboot.BaseCassandra;
@@ -32,28 +31,18 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraIdempotentIT.class,
- CassandraIdempotentIT.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraIdempotentIT.class,
+ CassandraIdempotentIT.TestConfiguration.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraIdempotentIT extends BaseCassandra {
CassandraIdempotentRepository idempotentRepository;
-
@EndpointInject("mock:output")
MockEndpoint mockOutput;
-
-
-
private void send(String idempotentId, String body) {
super.template.sendBodyAndHeader("direct:input", body, "idempotentId", idempotentId);
}
@@ -61,7 +50,7 @@ public class CassandraIdempotentIT extends BaseCassandra {
@Test
public void testIdempotentRoute() throws Exception {
// Given
-
+
mockOutput.expectedMessageCount(2);
mockOutput.expectedBodiesReceivedInAnyOrder("A", "B");
// When
@@ -90,7 +79,8 @@ public class CassandraIdempotentIT extends BaseCassandra {
idempotentRepository = new NamedCassandraIdempotentRepository(getSession(), "ID");
idempotentRepository.setTable("NAMED_CAMEL_IDEMPOTENT");
idempotentRepository.start();
- from("direct:input").idempotentConsumer(header("idempotentId"), idempotentRepository).to("mock:output");
+ from("direct:input").idempotentConsumer(header("idempotentId"), idempotentRepository)
+ .to("mock:output");
}
};
}
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentRepositoryIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentRepositoryIT.java
index 44c83eeea5c..74268b493c1 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentRepositoryIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/CassandraIdempotentRepositoryIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.idempotent.cassandra;
-
import org.apache.camel.component.cassandra.springboot.BaseCassandra;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
@@ -32,24 +31,14 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CassandraIdempotentRepositoryIT.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CassandraIdempotentRepositoryIT.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class CassandraIdempotentRepositoryIT extends BaseCassandra {
CassandraIdempotentRepository idempotentRepository;
-
-
-
-
@BeforeEach
protected void doPreSetup() throws Exception {
idempotentRepository = new CassandraIdempotentRepository(getSession());
@@ -63,14 +52,14 @@ public class CassandraIdempotentRepositoryIT extends BaseCassandra {
executeScript("IdempotentDataSet.cql");
}
-
@AfterEach
public void tearDown() throws Exception {
idempotentRepository.stop();
}
private boolean exists(String key) {
- return getSession().execute(String.format("select KEY from CAMEL_IDEMPOTENT where KEY='%s'", key)).one() != null;
+ return getSession().execute(String.format("select KEY from CAMEL_IDEMPOTENT where KEY='%s'", key))
+ .one() != null;
}
@Test
diff --git a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/NamedCassandraIdempotentRepositoryIT.java b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/NamedCassandraIdempotentRepositoryIT.java
index 829758fc09a..4cd3e44c737 100644
--- a/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/NamedCassandraIdempotentRepositoryIT.java
+++ b/components-starter/camel-cassandraql-starter/src/test/java/org/apache/camel/processor/idempotent/cassandra/NamedCassandraIdempotentRepositoryIT.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.processor.idempotent.cassandra;
-
import org.apache.camel.component.cassandra.springboot.BaseCassandra;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
@@ -32,24 +31,14 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- NamedCassandraIdempotentRepositoryIT.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, NamedCassandraIdempotentRepositoryIT.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class NamedCassandraIdempotentRepositoryIT extends BaseCassandra {
CassandraIdempotentRepository idempotentRepository;
-
-
-
-
@BeforeEach
protected void doPreSetup() throws Exception {
idempotentRepository = new NamedCassandraIdempotentRepository(getSession(), "ID");
@@ -64,16 +53,15 @@ public class NamedCassandraIdempotentRepositoryIT extends BaseCassandra {
executeScript("NamedIdempotentDataSet.cql");
}
-
@AfterEach
public void tearDown() throws Exception {
idempotentRepository.stop();
}
private boolean exists(String key) {
- return getSession().execute(String.format("select KEY from NAMED_CAMEL_IDEMPOTENT where NAME='ID' and KEY='%s'", key))
- .one()
- != null;
+ return getSession()
+ .execute(String.format("select KEY from NAMED_CAMEL_IDEMPOTENT where NAME='ID' and KEY='%s'", key))
+ .one() != null;
}
@Test
diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryAutoConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryAutoConfiguration.java
index 613d37fddb1..055997bdc11 100644
--- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryAutoConfiguration.java
+++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryAutoConfiguration.java
@@ -71,7 +71,8 @@ public class ConsulServiceDiscoveryAutoConfiguration {
if (beanFactory != null) {
Map<String, Object> parameters = new HashMap<>();
- for (Map.Entry<String, ConsulServiceCallServiceDiscoveryConfigurationCommon> entry : configuration.getConfigurations().entrySet()) {
+ for (Map.Entry<String, ConsulServiceCallServiceDiscoveryConfigurationCommon> entry : configuration
+ .getConfigurations().entrySet()) {
// clean up params
parameters.clear();
@@ -97,10 +98,7 @@ public class ConsulServiceDiscoveryAutoConfiguration {
public static class Condition extends GroupCondition {
public Condition() {
- super(
- "camel.cloud.consul",
- "camel.cloud.consul.service-discovery"
- );
+ super("camel.cloud.consul", "camel.cloud.consul.service-discovery");
}
}
}
diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java
index f0698ebc479..3a940bacbf1 100644
--- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java
+++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryAutoConfiguration.java
@@ -40,7 +40,8 @@ public class ConsulServiceRegistryAutoConfiguration {
@Bean(name = "consul-service-registry")
@Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
- public ConsulServiceRegistry consulServiceRegistry(ConsulServiceRegistryConfiguration configuration) throws Exception {
+ public ConsulServiceRegistry consulServiceRegistry(ConsulServiceRegistryConfiguration configuration)
+ throws Exception {
ConsulServiceRegistry service = new ConsulServiceRegistry();
CamelPropertiesHelper.setCamelProperties(camelContext, service,
diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java
index 4dd6b295f25..1517cd157e7 100644
--- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java
+++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceRegistryConfiguration.java
@@ -28,7 +28,8 @@ import org.apache.camel.support.jsse.SSLContextParameters;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "camel.cloud.consul")
-public class ConsulServiceRegistryConfiguration extends org.apache.camel.component.consul.cloud.ConsulServiceRegistryConfiguration {
+public class ConsulServiceRegistryConfiguration
+ extends org.apache.camel.component.consul.cloud.ConsulServiceRegistryConfiguration {
/**
* Sets if the consul service registry should be enabled or not, default is false.
@@ -44,7 +45,7 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
* Custom service attributes.
*/
private Map<String, Object> attributes;
-
+
/**
* Service lookup order/priority.
*/
@@ -82,8 +83,6 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
this.order = order;
}
-
-
//
// Fields copied from org.apache.camel.component.consul.cloud.ConsulServiceRegistryConfiguration
// to add javadoc which is used by spring-boot-configuration-processor
@@ -91,8 +90,7 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
// ----------------
/**
- * Should we remove all the registered services know by this registry on
- * stop?
+ * Should we remove all the registered services know by this registry on stop?
*/
private boolean deregisterServicesOnStop = true;
@@ -112,14 +110,13 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
private int checkTtl = 60;
/**
- * How often (in seconds) a service has to be marked as healthy if its check
- * is TTL or how often the check should run. Default is 5 seconds.
+ * How often (in seconds) a service has to be marked as healthy if its check is TTL or how often the check should
+ * run. Default is 5 seconds.
*/
private int checkInterval = 5;
/**
- * How long (in seconds) to wait to deregister a service in case of unclean
- * shutdown. Default is 1 hour.
+ * How long (in seconds) to wait to deregister a service in case of unclean shutdown. Default is 1 hour.
*/
private int deregisterAfter = 3600;
@@ -127,26 +124,26 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
// Fields copied from org.apache.camel.component.consul.cluster.ConsulClusterConfiguration
// ------------------------------------------
/**
- *
+ *
*/
private int sessionTtl = 60;
/**
- *
+ *
*/
private int sessionLockDelay = 5;
/**
- *
+ *
*/
private int sessionRefreshInterval = 5;
/**
- *
+ *
*/
private String rootPath = "/camel";
- //
+ //
// Fields copied from org.apache.camel.component.consul.ConsulClientConfiguration
// ---------------
@@ -186,8 +183,7 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
private Set<String> tags;
/**
- * SSL configuration using an
- * org.apache.camel.support.jsse.SSLContextParameters instance.
+ * SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance.
*/
private SSLContextParameters sslContextParameters;
@@ -237,8 +233,7 @@ public class ConsulServiceRegistryConfiguration extends org.apache.camel.compone
private Duration writeTimeout;
/**
- * Configure if the AgentClient should attempt a ping before returning the
- * Consul instance
+ * Configure if the AgentClient should attempt a ping before returning the Consul instance
*/
private boolean pingInstance = true;
diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java
index 616abf47407..f1328817d8f 100644
--- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java
+++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceAutoConfiguration.java
@@ -45,38 +45,22 @@ public class ConsulClusterServiceAutoConfiguration {
public CamelClusterService consulClusterService() throws Exception {
ConsulClusterService service = new ConsulClusterService();
- Optional.ofNullable(configuration.getId())
- .ifPresent(service::setId);
- Optional.ofNullable(configuration.getOrder())
- .ifPresent(service::setOrder);
- Optional.ofNullable(configuration.getAttributes())
- .ifPresent(service::setAttributes);
- Optional.ofNullable(configuration.getAclToken())
- .ifPresent(service::setAclToken);
- Optional.ofNullable(configuration.getDatacenter())
- .ifPresent(service::setDatacenter);
- Optional.ofNullable(configuration.getBlockSeconds())
- .ifPresent(service::setBlockSeconds);
- Optional.ofNullable(configuration.getConnectTimeout())
- .ifPresent(service::setConnectTimeout);
- Optional.ofNullable(configuration.getUrl())
- .ifPresent(service::setUrl);
- Optional.ofNullable(configuration.getSessionLockDelay())
- .ifPresent(service::setLockDelay);
- Optional.ofNullable(configuration.getPassword())
- .ifPresent(service::setPassword);
- Optional.ofNullable(configuration.getReadTimeout())
- .ifPresent(service::setReadTimeout);
- Optional.ofNullable(configuration.getRootPath())
- .ifPresent(service::setRootPath);
- Optional.ofNullable(configuration.getSslContextParameters())
- .ifPresent(service::setSslContextParameters);
- Optional.ofNullable(configuration.getSessionTtl())
- .ifPresent(service::setTtl);
- Optional.ofNullable(configuration.getUserName())
- .ifPresent(service::setUserName);
- Optional.ofNullable(configuration.getWriteTimeout())
- .ifPresent(service::setWriteTimeout);
+ Optional.ofNullable(configuration.getId()).ifPresent(service::setId);
+ Optional.ofNullable(configuration.getOrder()).ifPresent(service::setOrder);
+ Optional.ofNullable(configuration.getAttributes()).ifPresent(service::setAttributes);
+ Optional.ofNullable(configuration.getAclToken()).ifPresent(service::setAclToken);
+ Optional.ofNullable(configuration.getDatacenter()).ifPresent(service::setDatacenter);
+ Optional.ofNullable(configuration.getBlockSeconds()).ifPresent(service::setBlockSeconds);
+ Optional.ofNullable(configuration.getConnectTimeout()).ifPresent(service::setConnectTimeout);
+ Optional.ofNullable(configuration.getUrl()).ifPresent(service::setUrl);
+ Optional.ofNullable(configuration.getSessionLockDelay()).ifPresent(service::setLockDelay);
+ Optional.ofNullable(configuration.getPassword()).ifPresent(service::setPassword);
+ Optional.ofNullable(configuration.getReadTimeout()).ifPresent(service::setReadTimeout);
+ Optional.ofNullable(configuration.getRootPath()).ifPresent(service::setRootPath);
+ Optional.ofNullable(configuration.getSslContextParameters()).ifPresent(service::setSslContextParameters);
+ Optional.ofNullable(configuration.getSessionTtl()).ifPresent(service::setTtl);
+ Optional.ofNullable(configuration.getUserName()).ifPresent(service::setUserName);
+ Optional.ofNullable(configuration.getWriteTimeout()).ifPresent(service::setWriteTimeout);
service.setConfiguration(configuration);
return service;
diff --git a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java
index a2a077f3b3b..22b8e34e1df 100644
--- a/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java
+++ b/components-starter/camel-consul-starter/src/main/java/org/apache/camel/component/consul/springboot/cluster/ConsulClusterServiceConfiguration.java
@@ -45,7 +45,7 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
* Custom service attributes.
*/
private Map<String, Object> attributes;
-
+
/**
* Service lookup order/priority.
*/
@@ -83,7 +83,6 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
this.order = order;
}
-
//
// Fields copied from org.apache.camel.component.consul.cluster.ConsulClusterConfiguration
// to add javadoc which is used by spring-boot-configuration-processor
@@ -109,8 +108,8 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
*/
private String rootPath = "/camel";
- //
- // Fields copied from
+ //
+ // Fields copied from
// org.apache.camel.component.consul.ConsulClientConfiguration
// ---------------
@@ -150,8 +149,7 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
private Set<String> tags;
/**
- * SSL configuration using an
- * org.apache.camel.support.jsse.SSLContextParameters instance.
+ * SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance.
*/
private SSLContextParameters sslContextParameters;
@@ -201,8 +199,7 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
private Duration writeTimeout;
/**
- * Configure if the AgentClient should attempt a ping before returning the
- * Consul instance
+ * Configure if the AgentClient should attempt a ping before returning the Consul instance
*/
private boolean pingInstance = true;
@@ -221,4 +218,3 @@ public class ConsulClusterServiceConfiguration extends ConsulClusterConfiguratio
*/
private boolean recursive;
}
-
diff --git a/components-starter/camel-consul-starter/src/test/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryTest.java b/components-starter/camel-consul-starter/src/test/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryTest.java
index b74aceef2c9..57584370a62 100644
--- a/components-starter/camel-consul-starter/src/test/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryTest.java
+++ b/components-starter/camel-consul-starter/src/test/java/org/apache/camel/component/consul/springboot/cloud/ConsulServiceDiscoveryTest.java
@@ -28,32 +28,22 @@ import static org.assertj.core.api.Assertions.assertThat;
public class ConsulServiceDiscoveryTest {
@Test
public void testConsulServiceDiscoveryDisabled() {
- new ApplicationContextRunner()
- .withUserConfiguration(TestConfiguration.class)
- .withPropertyValues(
- "spring.main.banner-mode=off",
- "camel.cloud.consul.service-discovery.enabled=false")
- .run(
- context -> {
+ new ApplicationContextRunner().withUserConfiguration(TestConfiguration.class)
+ .withPropertyValues("spring.main.banner-mode=off", "camel.cloud.consul.service-discovery.enabled=false")
+ .run(context -> {
assertThat(context).doesNotHaveBean(ConsulServiceCallServiceDiscoveryConfigurationProperties.class);
assertThat(context).getBeans(ServiceDiscovery.class).doesNotContainKeys("consul-service-discovery");
- }
- );
+ });
}
@Test
public void testConsulServiceDiscoveryEnabled() {
- new ApplicationContextRunner()
- .withUserConfiguration(TestConfiguration.class)
- .withPropertyValues(
- "spring.main.banner-mode=off",
- "camel.cloud.consul.service-discovery.enabled=true")
- .run(
- context -> {
+ new ApplicationContextRunner().withUserConfiguration(TestConfiguration.class)
+ .withPropertyValues("spring.main.banner-mode=off", "camel.cloud.consul.service-discovery.enabled=true")
+ .run(context -> {
assertThat(context).hasSingleBean(ConsulServiceCallServiceDiscoveryConfigurationProperties.class);
assertThat(context).getBeans(ServiceDiscovery.class).containsKeys("consul-service-discovery");
- }
- );
+ });
}
@EnableAutoConfiguration
diff --git a/components-starter/camel-cron-starter/src/test/java/org/apache/camel/component/cron/springboot/CronLoaderTest.java b/components-starter/camel-cron-starter/src/test/java/org/apache/camel/component/cron/springboot/CronLoaderTest.java
index a7a442604d7..866ed34c829 100644
--- a/components-starter/camel-cron-starter/src/test/java/org/apache/camel/component/cron/springboot/CronLoaderTest.java
+++ b/components-starter/camel-cron-starter/src/test/java/org/apache/camel/component/cron/springboot/CronLoaderTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.cron.springboot;
-
import org.apache.camel.CamelContext;
import org.apache.camel.EndpointInject;
import org.apache.camel.ProducerTemplate;
@@ -38,55 +37,42 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- CronLoaderTest.class,
- CronLoaderTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, CronLoaderTest.class,
+ CronLoaderTest.TestConfiguration.class })
public class CronLoaderTest {
@Autowired
private CamelContext context;
-
+
@Autowired
ProducerTemplate template;
@EndpointInject("mock:result")
MockEndpoint mock;
-
+
@Bean("dummy2")
private DummyCamelCronService getDummyCamelCronService() {
return new DummyCamelCronService("dummy2");
}
-
-
-
-
@Test
void testDummyCronServiceLoading() throws Exception {
-
+
mock.expectedMinimumMessageCount(1);
mock.assertIsSatisfied();
}
-
+
@Test
void testPreferRegistryOverServiceLoading() throws Exception {
assertEquals("dummy2", getCamelCronService().getId());
}
-
-
-
+
private CamelCronService getCamelCronService() {
return context.getComponent("cron", CronComponent.class).getService();
}
-
// *************************************
// Config
@@ -100,9 +86,7 @@ public class CronLoaderTest {
return new RouteBuilder() {
@Override
public void configure() {
- from("cron:tab?schedule=0/1 * * * * ?")
- .setBody().constant("x")
- .to("mock:result");
+ from("cron:tab?schedule=0/1 * * * * ?").setBody().constant("x").to("mock:result");
}
};
}
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConverter.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConverter.java
index 0ec9e34cc73..fb8cebe06d1 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConverter.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/springboot/DisruptorComponentConverter.java
@@ -25,14 +25,11 @@ import org.springframework.core.convert.converter.GenericConverter;
/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
-public class DisruptorComponentConverter
- implements
- org.springframework.core.convert.converter.GenericConverter {
+public class DisruptorComponentConverter implements org.springframework.core.convert.converter.GenericConverter {
private final CamelContext camelContext;
- public DisruptorComponentConverter(
- org.apache.camel.CamelContext camelContext) {
+ public DisruptorComponentConverter(org.apache.camel.CamelContext camelContext) {
this.camelContext = camelContext;
}
@@ -43,10 +40,7 @@ public class DisruptorComponentConverter
return answer;
}
- public Object convert(
- Object source,
- TypeDescriptor sourceType,
- TypeDescriptor targetType) {
+ public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return null;
}
@@ -56,8 +50,12 @@ public class DisruptorComponentConverter
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
- case "org.apache.camel.component.disruptor.DisruptorWaitStrategy": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.disruptor.DisruptorWaitStrategy.class);
- case "org.apache.camel.component.disruptor.DisruptorProducerType": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.disruptor.DisruptorProducerType.class);
+ case "org.apache.camel.component.disruptor.DisruptorWaitStrategy":
+ return camelContext.getRegistry().lookupByNameAndType(ref,
+ org.apache.camel.component.disruptor.DisruptorWaitStrategy.class);
+ case "org.apache.camel.component.disruptor.DisruptorProducerType":
+ return camelContext.getRegistry().lookupByNameAndType(ref,
+ org.apache.camel.component.disruptor.DisruptorProducerType.class);
}
return null;
}
diff --git a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConverter.java b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConverter.java
index e5f30ab884a..efd9524564f 100644
--- a/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConverter.java
+++ b/components-starter/camel-disruptor-starter/src/main/java/org/apache/camel/component/disruptor/vm/springboot/DisruptorVmComponentConverter.java
@@ -25,14 +25,11 @@ import org.springframework.core.convert.converter.GenericConverter;
/**
* Generated by camel-package-maven-plugin - do not edit this file!
*/
-public class DisruptorVmComponentConverter
- implements
- org.springframework.core.convert.converter.GenericConverter {
+public class DisruptorVmComponentConverter implements org.springframework.core.convert.converter.GenericConverter {
private final CamelContext camelContext;
- public DisruptorVmComponentConverter(
- org.apache.camel.CamelContext camelContext) {
+ public DisruptorVmComponentConverter(org.apache.camel.CamelContext camelContext) {
this.camelContext = camelContext;
}
@@ -43,10 +40,7 @@ public class DisruptorVmComponentConverter
return answer;
}
- public Object convert(
- Object source,
- TypeDescriptor sourceType,
- TypeDescriptor targetType) {
+ public Object convert(Object source, TypeDescriptor sourceType, TypeDescriptor targetType) {
if (source == null) {
return null;
}
@@ -56,8 +50,12 @@ public class DisruptorVmComponentConverter
}
ref = ref.startsWith("#bean:") ? ref.substring(6) : ref.substring(1);
switch (targetType.getName()) {
- case "org.apache.camel.component.disruptor.DisruptorWaitStrategy": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.disruptor.DisruptorWaitStrategy.class);
- case "org.apache.camel.component.disruptor.DisruptorProducerType": return camelContext.getRegistry().lookupByNameAndType(ref, org.apache.camel.component.disruptor.DisruptorProducerType.class);
+ case "org.apache.camel.component.disruptor.DisruptorWaitStrategy":
+ return camelContext.getRegistry().lookupByNameAndType(ref,
+ org.apache.camel.component.disruptor.DisruptorWaitStrategy.class);
+ case "org.apache.camel.component.disruptor.DisruptorProducerType":
+ return camelContext.getRegistry().lookupByNameAndType(ref,
+ org.apache.camel.component.disruptor.DisruptorProducerType.class);
}
return null;
}
diff --git a/components-starter/camel-dns-starter/src/main/java/org/apache/camel/component/dns/springboot/cloud/DnsCloudAutoConfiguration.java b/components-starter/camel-dns-starter/src/main/java/org/apache/camel/component/dns/springboot/cloud/DnsCloudAutoConfiguration.java
index 0b4df9cfbd5..25bbbf923b1 100644
--- a/components-starter/camel-dns-starter/src/main/java/org/apache/camel/component/dns/springboot/cloud/DnsCloudAutoConfiguration.java
+++ b/components-starter/camel-dns-starter/src/main/java/org/apache/camel/component/dns/springboot/cloud/DnsCloudAutoConfiguration.java
@@ -73,7 +73,8 @@ public class DnsCloudAutoConfiguration {
if (beanFactory != null) {
Map<String, Object> parameters = new HashMap<>();
- for (Map.Entry<String, DnsServiceCallServiceDiscoveryConfigurationCommon> entry : configuration.getConfigurations().entrySet()) {
+ for (Map.Entry<String, DnsServiceCallServiceDiscoveryConfigurationCommon> entry : configuration
+ .getConfigurations().entrySet()) {
// clean up params
parameters.clear();
@@ -99,10 +100,7 @@ public class DnsCloudAutoConfiguration {
public static class Condition extends GroupCondition {
public Condition() {
- super(
- "camel.cloud.dns",
- "camel.cloud.dns.service-discovery"
- );
+ super("camel.cloud.dns", "camel.cloud.dns.service-discovery");
}
}
}
diff --git a/components-starter/camel-dns-starter/src/test/java/org/apache/camel/component/dns/springboot/cloud/DnsServiceDiscoveryTest.java b/components-starter/camel-dns-starter/src/test/java/org/apache/camel/component/dns/springboot/cloud/DnsServiceDiscoveryTest.java
index e9388f5803c..a32bdf5caf2 100644
--- a/components-starter/camel-dns-starter/src/test/java/org/apache/camel/component/dns/springboot/cloud/DnsServiceDiscoveryTest.java
+++ b/components-starter/camel-dns-starter/src/test/java/org/apache/camel/component/dns/springboot/cloud/DnsServiceDiscoveryTest.java
@@ -28,32 +28,22 @@ import static org.assertj.core.api.Assertions.assertThat;
public class DnsServiceDiscoveryTest {
@Test
public void testServiceDiscoveryDisabled() {
- new ApplicationContextRunner()
- .withUserConfiguration(TestConfiguration.class)
- .withPropertyValues(
- "spring.main.banner-mode=off",
- "camel.cloud.dns.service-discovery.enabled=false")
- .run(
- context -> {
+ new ApplicationContextRunner().withUserConfiguration(TestConfiguration.class)
+ .withPropertyValues("spring.main.banner-mode=off", "camel.cloud.dns.service-discovery.enabled=false")
+ .run(context -> {
assertThat(context).doesNotHaveBean(DnsServiceCallServiceDiscoveryConfigurationProperties.class);
assertThat(context).getBeans(ServiceDiscovery.class).doesNotContainKeys("dns-service-discovery");
- }
- );
+ });
}
@Test
public void testServiceDiscoveryEnabled() {
- new ApplicationContextRunner()
- .withUserConfiguration(TestConfiguration.class)
- .withPropertyValues(
- "spring.main.banner-mode=off",
- "camel.cloud.dns.service-discovery.enabled=true")
- .run(
- context -> {
+ new ApplicationContextRunner().withUserConfiguration(TestConfiguration.class)
+ .withPropertyValues("spring.main.banner-mode=off", "camel.cloud.dns.service-discovery.enabled=true")
+ .run(context -> {
assertThat(context).hasSingleBean(DnsServiceCallServiceDiscoveryConfigurationProperties.class);
assertThat(context).getBeans(ServiceDiscovery.class).containsKeys("dns-service-discovery");
- }
- );
+ });
}
@EnableAutoConfiguration
diff --git a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizer.java b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizer.java
index 8ff7ad0879b..03457900d1c 100644
--- a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizer.java
+++ b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizer.java
@@ -34,24 +34,18 @@ import org.springframework.context.annotation.Configuration;
/**
* A simple implementation of {@link ComponentCustomizer} that auto discovers a
- * {@link org.ehcache.config.CacheConfiguration} instance and bind it to the
- * {@link EhcacheComponent} component.
+ * {@link org.ehcache.config.CacheConfiguration} instance and bind it to the {@link EhcacheComponent} component.
*
* This customizer can be disabled/enabled with different strategies:
*
- * 1. globally using:
- * camel.component.customizer.enable = true/false
- * 2. for component:
- * camel.component.ehcache.customizer.enabled = true/false
- * 3. individually:
- * camel.component.ehcache.customizer.cache-configuration.enabled = true/false
+ * 1. globally using: camel.component.customizer.enable = true/false 2. for component:
+ * camel.component.ehcache.customizer.enabled = true/false 3. individually:
+ * camel.component.ehcache.customizer.cache-configuration.enabled = true/false
*/
@Configuration
@ConditionalOnBean(CamelAutoConfiguration.class)
-@ConditionalOnHierarchicalProperties({
- "camel.component.customizer",
- "camel.component.ehcache.customizer",
- "camel.component.ehcache.customizer.cache-configuration"})
+@ConditionalOnHierarchicalProperties({ "camel.component.customizer", "camel.component.ehcache.customizer",
+ "camel.component.ehcache.customizer.cache-configuration" })
@AutoConfigureAfter(CamelAutoConfiguration.class)
@EnableConfigurationProperties(CacheConfigurationCustomizerConfiguration.class)
public class CacheConfigurationCustomizer implements HasId, ComponentCustomizer {
@@ -62,12 +56,14 @@ public class CacheConfigurationCustomizer implements HasId, ComponentCustomizer
@Override
public void configure(String name, Component target) {
- EhcacheComponent component = (EhcacheComponent)target;
+ EhcacheComponent component = (EhcacheComponent) target;
- if (configurations != null && configuration.getMode() == CacheConfigurationCustomizerConfiguration.Mode.APPEND) {
+ if (configurations != null
+ && configuration.getMode() == CacheConfigurationCustomizerConfiguration.Mode.APPEND) {
component.addCachesConfigurations(configurations);
}
- if (configurations != null && configuration.getMode() == CacheConfigurationCustomizerConfiguration.Mode.REPLACE) {
+ if (configurations != null
+ && configuration.getMode() == CacheConfigurationCustomizerConfiguration.Mode.REPLACE) {
component.setCachesConfigurations(configurations);
}
}
diff --git a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerConfiguration.java b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerConfiguration.java
index 67fc8f137de..0efc0e331b9 100644
--- a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerConfiguration.java
+++ b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerConfiguration.java
@@ -26,11 +26,11 @@ public class CacheConfigurationCustomizerConfiguration {
private boolean enabled = true;
/**
- * Configure if the cache configurations have be added or they have to replace those already configured on the component.
+ * Configure if the cache configurations have be added or they have to replace those already configured on the
+ * component.
*/
private Mode mode = Mode.APPEND;
-
public boolean isEnabled() {
return enabled;
}
@@ -48,7 +48,6 @@ public class CacheConfigurationCustomizerConfiguration {
}
public enum Mode {
- REPLACE,
- APPEND
+ REPLACE, APPEND
}
}
diff --git a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizer.java b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizer.java
index 82c817aff47..ab8dfb37d78 100644
--- a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizer.java
+++ b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizer.java
@@ -33,25 +33,19 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Configuration;
/**
- * A simple implementation of {@link ComponentCustomizer} that auto discovers a
- * {@link CacheManager} instance and bind it to the {@link EhcacheComponent}
- * component.
+ * A simple implementation of {@link ComponentCustomizer} that auto discovers a {@link CacheManager} instance and bind
+ * it to the {@link EhcacheComponent} component.
*
* This customizer can be disabled/enabled with different strategies:
*
- * 1. globally using:
- * camel.component.customizer.enable = true/false
- * 2. for component:
- * camel.component.ehcache.customizer.enabled = true/false
- * 3. individually:
- * camel.component.ehcache.customizer.cache-manager.enabled = true/false
+ * 1. globally using: camel.component.customizer.enable = true/false 2. for component:
+ * camel.component.ehcache.customizer.enabled = true/false 3. individually:
+ * camel.component.ehcache.customizer.cache-manager.enabled = true/false
*/
@Configuration(proxyBeanMethods = false)
-@ConditionalOnBean({CamelAutoConfiguration.class, CacheManager.class})
-@ConditionalOnHierarchicalProperties({
- "camel.component.customizer",
- "camel.component.ehcache.customizer",
- "camel.component.ehcache.customizer.cache-manager"})
+@ConditionalOnBean({ CamelAutoConfiguration.class, CacheManager.class })
+@ConditionalOnHierarchicalProperties({ "camel.component.customizer", "camel.component.ehcache.customizer",
+ "camel.component.ehcache.customizer.cache-manager" })
@AutoConfigureAfter(CamelAutoConfiguration.class)
@EnableConfigurationProperties(CacheManagerCustomizerConfiguration.class)
public class CacheManagerCustomizer implements HasId, ComponentCustomizer {
@@ -62,7 +56,7 @@ public class CacheManagerCustomizer implements HasId, ComponentCustomizer {
@Override
public void configure(String name, Component target) {
- EhcacheComponent component = (EhcacheComponent)target;
+ EhcacheComponent component = (EhcacheComponent) target;
// Set the cache manager only if the customizer is configured to always
// set it or if no cache manager is already configured on component
diff --git a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerConfiguration.java b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerConfiguration.java
index 76bc48751c5..75b7ff51429 100644
--- a/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerConfiguration.java
+++ b/components-starter/camel-ehcache-starter/src/main/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerConfiguration.java
@@ -30,7 +30,6 @@ public class CacheManagerCustomizerConfiguration {
*/
private boolean override;
-
public boolean isEnabled() {
return enabled;
}
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledAppendTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledAppendTest.java
index e463b1cdaf8..87543fc1f0a 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledAppendTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledAppendTest.java
@@ -42,17 +42,10 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheConfigurationCustomizerEnabledAppendTest.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false",
- "camel.component.ehcache.customizer.enabled=true",
+@SpringBootTest(classes = { CacheConfigurationCustomizerEnabledAppendTest.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false", "camel.component.ehcache.customizer.enabled=true",
"camel.component.ehcache.customizer.cache-configuration.enabled=true",
- "camel.component.ehcache.customizer.cache-configuration.mode=APPEND"
- })
+ "camel.component.ehcache.customizer.cache-configuration.mode=APPEND" })
public class CacheConfigurationCustomizerEnabledAppendTest {
private static final String CACHE_CONFIG_ID = UUID.randomUUID().toString();
@@ -79,42 +72,31 @@ public class CacheConfigurationCustomizerEnabledAppendTest {
static class TestConfiguration {
@Bean
public ComponentCustomizer customizer() {
- return ComponentCustomizer.builder(EhcacheComponent.class)
- .withOrder(Ordered.HIGHEST)
- .build(component -> {
- component.addCachesConfigurations(Collections.singletonMap(
- CACHE_CONFIG_ID,
- CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(2100, EntryUnit.ENTRIES)
- .offheap(2, MemoryUnit.MB))
- .build()
- ));
- });
+ return ComponentCustomizer.builder(EhcacheComponent.class).withOrder(Ordered.HIGHEST).build(component -> {
+ component
+ .addCachesConfigurations(Collections.singletonMap(CACHE_CONFIG_ID,
+ CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class,
+ ResourcePoolsBuilder.newResourcePoolsBuilder()
+ .heap(2100, EntryUnit.ENTRIES).offheap(2, MemoryUnit.MB))
+ .build()));
+ });
}
@Bean
public CacheConfiguration<?, ?> myConfig1() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(100, EntryUnit.ENTRIES)
- .offheap(1, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(100, EntryUnit.ENTRIES).offheap(1, MemoryUnit.MB))
+ .build();
}
@Bean
public CacheConfiguration<?, ?> myConfig2() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(2100, EntryUnit.ENTRIES)
- .offheap(2, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(2100, EntryUnit.ENTRIES).offheap(2, MemoryUnit.MB))
+ .build();
}
}
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledReplaceTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledReplaceTest.java
index 0efb03c75ae..b15c13b2527 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledReplaceTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerEnabledReplaceTest.java
@@ -42,17 +42,10 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheConfigurationCustomizerEnabledReplaceTest.TestConfiguration.class,
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false",
- "camel.component.ehcache.customizer.enabled=true",
+@SpringBootTest(classes = { CacheConfigurationCustomizerEnabledReplaceTest.TestConfiguration.class, }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false", "camel.component.ehcache.customizer.enabled=true",
"camel.component.ehcache.customizer.cache-configuration.enabled=true",
- "camel.component.ehcache.customizer.cache-configuration.mode=REPLACE"
- })
+ "camel.component.ehcache.customizer.cache-configuration.mode=REPLACE" })
public class CacheConfigurationCustomizerEnabledReplaceTest {
private static final String CACHE_CONFIG_ID = UUID.randomUUID().toString();
@@ -79,42 +72,31 @@ public class CacheConfigurationCustomizerEnabledReplaceTest {
static class TestConfiguration {
@Bean
public ComponentCustomizer customizer() {
- return ComponentCustomizer.builder(EhcacheComponent.class)
- .withOrder(Ordered.HIGHEST)
- .build(component -> {
- component.addCachesConfigurations(Collections.singletonMap(
- CACHE_CONFIG_ID,
- CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(2100, EntryUnit.ENTRIES)
- .offheap(2, MemoryUnit.MB))
- .build()
- ));
- });
+ return ComponentCustomizer.builder(EhcacheComponent.class).withOrder(Ordered.HIGHEST).build(component -> {
+ component
+ .addCachesConfigurations(Collections.singletonMap(CACHE_CONFIG_ID,
+ CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class,
+ ResourcePoolsBuilder.newResourcePoolsBuilder()
+ .heap(2100, EntryUnit.ENTRIES).offheap(2, MemoryUnit.MB))
+ .build()));
+ });
}
@Bean
public CacheConfiguration<?, ?> myConfig1() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(100, EntryUnit.ENTRIES)
- .offheap(1, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(100, EntryUnit.ENTRIES).offheap(1, MemoryUnit.MB))
+ .build();
}
@Bean
public CacheConfiguration<?, ?> myConfig2() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(2100, EntryUnit.ENTRIES)
- .offheap(2, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(2100, EntryUnit.ENTRIES).offheap(2, MemoryUnit.MB))
+ .build();
}
}
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledGlobalTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledGlobalTest.java
index fa21011b438..cc6591c6bbf 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledGlobalTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledGlobalTest.java
@@ -24,13 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false"
- })
+@SpringBootTest(classes = { CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false" })
public class CacheConfigurationCustomizerNotEnabledGlobalTest extends CacheConfigurationCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledOnComponentTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledOnComponentTest.java
index d352eac51e6..be016864f06 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledOnComponentTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledOnComponentTest.java
@@ -24,14 +24,8 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=true",
- "camel.component.ehcache.customizer.enabled=false"
- })
-public class CacheConfigurationCustomizerNotEnabledOnComponentTest extends CacheConfigurationCustomizerNotEnabledTestBase {
+@SpringBootTest(classes = { CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=true", "camel.component.ehcache.customizer.enabled=false" })
+public class CacheConfigurationCustomizerNotEnabledOnComponentTest
+ extends CacheConfigurationCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTest.java
index ed67854a05c..4c0bcfdc14a 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTest.java
@@ -24,13 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.ehcache.customizer.cache-configuration.enabled=false"
- })
+@SpringBootTest(classes = { CacheConfigurationCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.ehcache.customizer.cache-configuration.enabled=false" })
public class CacheConfigurationCustomizerNotEnabledTest extends CacheConfigurationCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTestBase.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTestBase.java
index 702a70c994a..9fcbc383e57 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTestBase.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheConfigurationCustomizerNotEnabledTestBase.java
@@ -51,23 +51,18 @@ class CacheConfigurationCustomizerNotEnabledTestBase {
public static class TestConfiguration {
@Bean
public CacheConfiguration<?, ?> myConfig1() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(100, EntryUnit.ENTRIES)
- .offheap(1, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(100, EntryUnit.ENTRIES).offheap(1, MemoryUnit.MB))
+ .build();
}
+
@Bean
public CacheConfiguration<?, ?> myConfig2() {
- return CacheConfigurationBuilder.newCacheConfigurationBuilder(
- String.class,
- String.class,
- ResourcePoolsBuilder.newResourcePoolsBuilder()
- .heap(2100, EntryUnit.ENTRIES)
- .offheap(2, MemoryUnit.MB))
- .build();
+ return CacheConfigurationBuilder
+ .newCacheConfigurationBuilder(String.class, String.class, ResourcePoolsBuilder
+ .newResourcePoolsBuilder().heap(2100, EntryUnit.ENTRIES).offheap(2, MemoryUnit.MB))
+ .build();
}
}
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledOnComponentTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledOnComponentTest.java
index 687e9c94f38..273bab244bc 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledOnComponentTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledOnComponentTest.java
@@ -24,14 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false",
- "camel.component.ehcache.customizer.enabled=true"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false", "camel.component.ehcache.customizer.enabled=true" })
public class CacheManagerCustomizerEnabledOnComponentTest extends CacheManagerCustomizerEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledTest.java
index 318a27a94a9..43f38b0eb45 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerEnabledTest.java
@@ -24,15 +24,8 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false",
- "camel.component.ehcache.customizer.enabled=false",
- "camel.component.ehcache.customizer.cache-manager.enabled=true"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false", "camel.component.ehcache.customizer.enabled=false",
+ "camel.component.ehcache.customizer.cache-manager.enabled=true" })
public class CacheManagerCustomizerEnabledTest extends CacheManagerCustomizerEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNoOverrideTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNoOverrideTest.java
index e23026c532d..4446bf3315e 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNoOverrideTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNoOverrideTest.java
@@ -36,19 +36,12 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
-
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerNoOverrideTest.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.ehcache.customizer.cache-manager.enabled=true",
- "camel.component.ehcache.customizer.cache-manager.override=false"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerNoOverrideTest.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.ehcache.customizer.cache-manager.enabled=true",
+ "camel.component.ehcache.customizer.cache-manager.override=false" })
public class CacheManagerCustomizerNoOverrideTest {
private static final CacheManager CACHE_MANAGER = CacheManagerBuilder.newCacheManagerBuilder().build();
@Autowired
@@ -72,9 +65,8 @@ public class CacheManagerCustomizerNoOverrideTest {
public static class TestConfiguration {
@Bean
public ComponentCustomizer customizer() {
- return ComponentCustomizer.builder(EhcacheComponent.class)
- .withOrder(Ordered.HIGHEST)
- .build(component -> component.setCacheManager(CACHE_MANAGER));
+ return ComponentCustomizer.builder(EhcacheComponent.class).withOrder(Ordered.HIGHEST)
+ .build(component -> component.setCacheManager(CACHE_MANAGER));
}
@Bean(initMethod = "init", destroyMethod = "close")
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledGlobalTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledGlobalTest.java
index ddeb041ea8f..60922e9cd02 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledGlobalTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledGlobalTest.java
@@ -24,13 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=false"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=false" })
public class CacheManagerCustomizerNotEnabledGlobalTest extends CacheManagerCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledOnComponentTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledOnComponentTest.java
index 1ad509235f1..7f8e276603f 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledOnComponentTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledOnComponentTest.java
@@ -24,14 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.customizer.enabled=true",
- "camel.component.ehcache.customizer.enabled=false"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.customizer.enabled=true", "camel.component.ehcache.customizer.enabled=false" })
public class CacheManagerCustomizerNotEnabledOnComponentTest extends CacheManagerCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledTest.java
index 0427df76d5c..ce5d102df62 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerNotEnabledTest.java
@@ -24,13 +24,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class
- },
- properties = {
- "debug=false",
- "camel.component.ehcache.customizer.cache-manager.enabled=false"
- })
+@SpringBootTest(classes = { CacheManagerCustomizerNotEnabledTestBase.TestConfiguration.class }, properties = {
+ "debug=false", "camel.component.ehcache.customizer.cache-manager.enabled=false" })
public class CacheManagerCustomizerNotEnabledTest extends CacheManagerCustomizerNotEnabledTestBase {
}
\ No newline at end of file
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerOverrideTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerOverrideTest.java
index 0af4f6e0c3a..3836c2a70f3 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerOverrideTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerOverrideTest.java
@@ -39,15 +39,9 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerOverrideTest.TestConfiguration.class
- },
- properties = {
- "debug=false",
+@SpringBootTest(classes = { CacheManagerCustomizerOverrideTest.TestConfiguration.class }, properties = { "debug=false",
"camel.component.ehcache.customizer.cache-manager.enabled=true",
- "camel.component.ehcache.customizer.cache-manager.override=true"
- })
+ "camel.component.ehcache.customizer.cache-manager.override=true" })
public class CacheManagerCustomizerOverrideTest {
private static final CacheManager CACHE_MANAGER = CacheManagerBuilder.newCacheManagerBuilder().build();
@@ -72,9 +66,8 @@ public class CacheManagerCustomizerOverrideTest {
public static class TestConfiguration {
@Bean
public ComponentCustomizer customizer() {
- return ComponentCustomizer.builder(EhcacheComponent.class)
- .withOrder(Ordered.HIGHEST)
- .build(component -> component.setCacheManager(CACHE_MANAGER));
+ return ComponentCustomizer.builder(EhcacheComponent.class).withOrder(Ordered.HIGHEST)
+ .build(component -> component.setCacheManager(CACHE_MANAGER));
}
@Bean(initMethod = "init", destroyMethod = "close")
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerTest.java
index f2d2b28ea3d..560344df740 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerTest.java
@@ -33,13 +33,7 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerTest.TestConfiguration.class
- },
- properties = {
- "debug=false",
- })
+@SpringBootTest(classes = { CacheManagerCustomizerTest.TestConfiguration.class }, properties = { "debug=false", })
public class CacheManagerCustomizerTest {
@Autowired
CacheManager cacheManager;
diff --git a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerWithoutCacheManagerTest.java b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerWithoutCacheManagerTest.java
index 3c6ebe63e2c..b9494000569 100644
--- a/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerWithoutCacheManagerTest.java
+++ b/components-starter/camel-ehcache-starter/src/test/java/org/apache/camel/component/ehcache/springboot/customizer/CacheManagerCustomizerWithoutCacheManagerTest.java
@@ -30,13 +30,8 @@ import org.springframework.test.annotation.DirtiesContext;
@CamelSpringBootTest
@DirtiesContext
@EnableAutoConfiguration
-@SpringBootTest(
- classes = {
- CacheManagerCustomizerWithoutCacheManagerTest.TestConfiguration.class
- },
- properties = {
- "debug=false",
- })
+@SpringBootTest(classes = { CacheManagerCustomizerWithoutCacheManagerTest.TestConfiguration.class }, properties = {
+ "debug=false", })
public class CacheManagerCustomizerWithoutCacheManagerTest {
@Autowired
CamelContext context;
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
index efec4aef57d..9214863aaf8 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/AbstractFhirTestSupport.java
@@ -62,8 +62,8 @@ public abstract class AbstractFhirTestSupport {
boolean patientExists() {
try {
- Bundle bundle
- = fhirClient.search().byUrl("Patient?given=Vincent&family=Freeman").returnBundle(Bundle.class).execute();
+ Bundle bundle = fhirClient.search().byUrl("Patient?given=Vincent&family=Freeman").returnBundle(Bundle.class)
+ .execute();
return !bundle.getEntry().isEmpty();
} catch (ResourceGoneException e) {
return false;
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomFhirConfiguration.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomFhirConfiguration.java
index 6d1859e86ed..f3371beac6d 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomFhirConfiguration.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomFhirConfiguration.java
@@ -22,7 +22,7 @@ import org.springframework.context.annotation.Bean;
public class CustomFhirConfiguration {
@Bean
- FhirConfiguration createCustomFhirConfiguration(){
+ FhirConfiguration createCustomFhirConfiguration() {
FhirConfiguration fhirConfiguration = new FhirConfiguration();
fhirConfiguration.setLog(true);
fhirConfiguration.setEncoding("JSON");
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomNoFhirServerUrlCamelContext.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomNoFhirServerUrlCamelContext.java
index 8f4c435415a..353ad914498 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomNoFhirServerUrlCamelContext.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/CustomNoFhirServerUrlCamelContext.java
@@ -43,7 +43,7 @@ public class CustomNoFhirServerUrlCamelContext {
@Override
public void afterApplicationStart(CamelContext camelContext) {
- //do nothing here
+ // do nothing here
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/DefaultCamelContext.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/DefaultCamelContext.java
index 5718c5daf4d..9fb48a43f8b 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/DefaultCamelContext.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/DefaultCamelContext.java
@@ -45,7 +45,7 @@ public class DefaultCamelContext {
@Override
public void afterApplicationStart(CamelContext camelContext) {
- //do nothing here
+ // do nothing here
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java
index da5412612f5..085bf67c945 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCapabilitiesIT.java
@@ -44,25 +44,19 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirCapabilitiesIT.class,
- FhirCapabilitiesIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirCapabilitiesIT.class,
+ FhirCapabilitiesIT.TestConfiguration.class, DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirCapabilitiesIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirCapabilitiesIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirCapabilitiesApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection()
+ .getApiName(FhirCapabilitiesApiMethod.class).getName();
@Test
public void testOfType() throws Exception {
- org.hl7.fhir.instance.model.api.IBaseConformance result = requestBody("direct://OF_TYPE", CapabilityStatement.class);
+ org.hl7.fhir.instance.model.api.IBaseConformance result = requestBody("direct://OF_TYPE",
+ CapabilityStatement.class);
LOG.debug("ofType: {}", result);
assertNotNull(result, "ofType result");
@@ -74,8 +68,8 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport {
Map<String, Object> headers = new HashMap<>();
headers.put(ExtraParameters.ENCODE_JSON.getHeaderName(), Boolean.TRUE);
- org.hl7.fhir.instance.model.api.IBaseConformance result
- = requestBodyAndHeaders("direct://OF_TYPE", CapabilityStatement.class, headers);
+ org.hl7.fhir.instance.model.api.IBaseConformance result = requestBodyAndHeaders("direct://OF_TYPE",
+ CapabilityStatement.class, headers);
LOG.debug("ofType: {}", result);
assertNotNull(result, "ofType result");
@@ -90,8 +84,7 @@ public class FhirCapabilitiesIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for ofType
- from("direct://OF_TYPE")
- .to("fhir://" + PATH_PREFIX + "/ofType?inBody=type&log=true");
+ from("direct://OF_TYPE").to("fhir://" + PATH_PREFIX + "/ofType?inBody=type&log=true");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java
index ca0c3b1d957..098c806580c 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirConfigurationIT.java
@@ -47,23 +47,17 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirConfigurationIT.class,
- FhirConfigurationIT.TestConfiguration.class,
- CustomFhirConfiguration.class,
- FhirServer.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirConfigurationIT.class,
+ FhirConfigurationIT.TestConfiguration.class, CustomFhirConfiguration.class, FhirServer.class })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirConfigurationIT extends AbstractFhirTestSupport {
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class)
+ .getName();
private static final String TEST_URI = "fhir://" + PATH_PREFIX + "/resource?inBody=resourceAsString&log=true&"
- + "encoding=JSON&summary=TEXT&compress=true&username=art&password=tatum&sessionCookie=mycookie%3DChips%20Ahoy"
- + "&accessToken=token&serverUrl=http://localhost:8080/hapi-fhir-jpaserver-example/baseR4&fhirVersion=R4";
+ + "encoding=JSON&summary=TEXT&compress=true&username=art&password=tatum&sessionCookie=mycookie%3DChips%20Ahoy"
+ + "&accessToken=token&serverUrl=http://localhost:8080/hapi-fhir-jpaserver-example/baseR4&fhirVersion=R4";
@Autowired
private IClientInterceptor mockClientInterceptor;
@@ -87,7 +81,7 @@ public class FhirConfigurationIT extends AbstractFhirTestSupport {
@Override
public void afterApplicationStart(CamelContext camelContext) {
- //do nothing here
+ // do nothing here
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java
index f17b5443f46..cbfaf42698b 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCreateIT.java
@@ -45,20 +45,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirCreateIT.class,
- FhirCreateIT.TestConfiguration.class,
- CustomNoFhirServerUrlCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirCreateIT.class, FhirCreateIT.TestConfiguration.class,
+ CustomNoFhirServerUrlCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirCreateIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirCreateIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class)
+ .getName();
@Test
public void testCreateResource() throws Exception {
@@ -106,13 +100,11 @@ public class FhirCreateIT extends AbstractFhirTestSupport {
// test route for resource
String serverUrl = service.getServiceBaseURL();
from("direct://RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resource?inBody=resource&serverUrl="
- + serverUrl);
+ .to("fhir://" + PATH_PREFIX + "/resource?inBody=resource&serverUrl=" + serverUrl);
// test route for resource
- from("direct://RESOURCE_STRING")
- .to("fhir://" + PATH_PREFIX + "/resource?inBody=resourceAsString&log=true&serverUrl="
- + serverUrl);
+ from("direct://RESOURCE_STRING").to("fhir://" + PATH_PREFIX
+ + "/resource?inBody=resourceAsString&log=true&serverUrl=" + serverUrl);
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
index 76d8ddd3481..566c6f6cf78 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirCustomClientConfigurationIT.java
@@ -68,33 +68,28 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirCustomClientConfigurationIT.class,
- FhirCustomClientConfigurationIT.TestConfiguration.class,
- CustomNoFhirServerUrlCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirCustomClientConfigurationIT.class,
+ FhirCustomClientConfigurationIT.TestConfiguration.class, CustomNoFhirServerUrlCamelContext.class,
+ FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirCustomClientConfigurationIT extends AbstractFhirTestSupport {
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class)
+ .getName();
- private static final String TEST_URI_CUSTOM_CLIENT
- = "fhir://" + PATH_PREFIX + "/resource?inBody=resourceAsString&client=#customClient";
+ private static final String TEST_URI_CUSTOM_CLIENT = "fhir://" + PATH_PREFIX
+ + "/resource?inBody=resourceAsString&client=#customClient";
- private static final String TEST_URI_CUSTOM_CLIENT_FACTORY
- = "fhir://" + PATH_PREFIX + "/resource?inBody=resourceAsString&clientFactory=#customClientFactory&serverUrl=foobar";
+ private static final String TEST_URI_CUSTOM_CLIENT_FACTORY = "fhir://" + PATH_PREFIX
+ + "/resource?inBody=resourceAsString&clientFactory=#customClientFactory&serverUrl=foobar";
@Bean("customClientFactory")
- public CustomClientFactory createCustomClientFactory(){
+ public CustomClientFactory createCustomClientFactory() {
return new CustomClientFactory();
}
@Bean("customClient")
- public CustomClient createCustomClient(){
+ public CustomClient createCustomClient() {
return new CustomClient();
}
@@ -144,9 +139,8 @@ public class FhirCustomClientConfigurationIT extends AbstractFhirTestSupport {
}
@Override
- public IHttpClient getHttpClient(
- StringBuilder theUrl, Map<String, List<String>> theIfNoneExistParams, String theIfNoneExistString,
- RequestTypeEnum theRequestType, List<Header> theHeaders) {
+ public IHttpClient getHttpClient(StringBuilder theUrl, Map<String, List<String>> theIfNoneExistParams,
+ String theIfNoneExistString, RequestTypeEnum theRequestType, List<Header> theHeaders) {
return null;
}
@@ -241,8 +235,8 @@ public class FhirCustomClientConfigurationIT extends AbstractFhirTestSupport {
}
@Override
- public void validateServerBaseIfConfiguredToDoSo(
- String theServerBase, IHttpClient theHttpClient, IRestfulClient theClient) {
+ public void validateServerBaseIfConfiguredToDoSo(String theServerBase, IHttpClient theHttpClient,
+ IRestfulClient theClient) {
}
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java
index d54143cfc8d..9e72ea81e3c 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirDeleteIT.java
@@ -45,20 +45,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirDeleteIT.class,
- FhirDeleteIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirDeleteIT.class, FhirDeleteIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirDeleteIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirDeleteIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirDeleteApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirDeleteApiMethod.class)
+ .getName();
@Test
public void testDeleteResource() throws Exception {
@@ -104,8 +98,8 @@ public class FhirDeleteIT extends AbstractFhirTestSupport {
public void testDeleteResourceConditionalByUrl() throws Exception {
assertTrue(patientExists());
- MethodOutcome result
- = requestBody("direct://RESOURCE_CONDITIONAL_BY_URL", "Patient?given=Vincent&family=Freeman");
+ MethodOutcome result = requestBody("direct://RESOURCE_CONDITIONAL_BY_URL",
+ "Patient?given=Vincent&family=Freeman");
LOG.debug("resourceConditionalByUrl: {}", result);
assertNotNull(result, "resourceConditionalByUrl result");
@@ -116,7 +110,8 @@ public class FhirDeleteIT extends AbstractFhirTestSupport {
public void testDeleteResourceConditionalByUrlCacheControlDirective() throws Exception {
assertTrue(patientExists());
Map<String, Object> headers = new HashMap<>();
- headers.put(ExtraParameters.CACHE_CONTROL_DIRECTIVE.getHeaderName(), new CacheControlDirective().setNoCache(true));
+ headers.put(ExtraParameters.CACHE_CONTROL_DIRECTIVE.getHeaderName(),
+ new CacheControlDirective().setNoCache(true));
MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_CONDITIONAL_BY_URL",
"Patient?given=Vincent&family=Freeman", headers);
@@ -134,16 +129,13 @@ public class FhirDeleteIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for resource
- from("direct://RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resource?inBody=resource");
+ from("direct://RESOURCE").to("fhir://" + PATH_PREFIX + "/resource?inBody=resource");
// test route for resourceById
- from("direct://RESOURCE_BY_ID")
- .to("fhir://" + PATH_PREFIX + "/resourceById?inBody=id");
+ from("direct://RESOURCE_BY_ID").to("fhir://" + PATH_PREFIX + "/resourceById?inBody=id");
// test route for resourceById
- from("direct://RESOURCE_BY_STRING_ID")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_STRING_ID").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceConditionalByUrl
from("direct://RESOURCE_CONDITIONAL_BY_URL")
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java
index f9844346fa7..f57620827ae 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirExtraParametersIT.java
@@ -44,20 +44,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirExtraParametersIT.class,
- FhirExtraParametersIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirExtraParametersIT.class,
+ FhirExtraParametersIT.TestConfiguration.class, DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirExtraParametersIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirExtraParametersIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class)
+ .getName();
@Test
public void testEncodeRequestToXml() throws Exception {
@@ -83,8 +77,7 @@ public class FhirExtraParametersIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for searchByUrl
- from("direct://SEARCH_BY_URL")
- .to("fhir://" + PATH_PREFIX + "/searchByUrl?inBody=url");
+ from("direct://SEARCH_BY_URL").to("fhir://" + PATH_PREFIX + "/searchByUrl?inBody=url");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java
index 897c472444a..78dae648dfb 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirHistoryIT.java
@@ -44,21 +44,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirHistoryIT.class,
- FhirHistoryIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirHistoryIT.class, FhirHistoryIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirHistoryIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirHistoryIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirHistoryApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirHistoryApiMethod.class)
+ .getName();
@Test
public void testOnInstance() throws Exception {
@@ -132,16 +125,13 @@ public class FhirHistoryIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for onInstance
- from("direct://ON_INSTANCE")
- .to("fhir://" + PATH_PREFIX + "/onInstance");
+ from("direct://ON_INSTANCE").to("fhir://" + PATH_PREFIX + "/onInstance");
// test route for onServer
- from("direct://ON_SERVER")
- .to("fhir://" + PATH_PREFIX + "/onServer");
+ from("direct://ON_SERVER").to("fhir://" + PATH_PREFIX + "/onServer");
// test route for onType
- from("direct://ON_TYPE")
- .to("fhir://" + PATH_PREFIX + "/onType");
+ from("direct://ON_TYPE").to("fhir://" + PATH_PREFIX + "/onType");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java
index 9ee3cb5ebd6..23d4b805416 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirLoadPageIT.java
@@ -51,28 +51,19 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirLoadPageIT.class,
- FhirLoadPageIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirLoadPageIT.class, FhirLoadPageIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirLoadPageIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirLoadPageIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirLoadPageApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirLoadPageApiMethod.class)
+ .getName();
@Test
public void testByUrl() throws Exception {
String url = "Patient?_count=2";
- Bundle bundle = this.fhirClient.search()
- .byUrl(url)
- .returnBundle(Bundle.class).execute();
+ Bundle bundle = this.fhirClient.search().byUrl(url).returnBundle(Bundle.class).execute();
assertNotNull(bundle.getLink(IBaseBundle.LINK_NEXT));
String nextPageLink = bundle.getLink("next").getUrl();
@@ -92,9 +83,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport {
@Test
public void testNext() throws Exception {
String url = "Patient?_count=2";
- Bundle bundle = this.fhirClient.search()
- .byUrl(url)
- .returnBundle(Bundle.class).execute();
+ Bundle bundle = this.fhirClient.search().byUrl(url).returnBundle(Bundle.class).execute();
assertNotNull(bundle.getLink(IBaseBundle.LINK_NEXT));
// using org.hl7.fhir.instance.model.api.IBaseBundle message body for single parameter "bundle"
@@ -107,9 +96,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport {
@Test
public void testPrevious() throws Exception {
String url = "Patient?_count=2";
- Bundle bundle = this.fhirClient.search()
- .byUrl(url)
- .returnBundle(Bundle.class).execute();
+ Bundle bundle = this.fhirClient.search().byUrl(url).returnBundle(Bundle.class).execute();
assertNotNull(bundle.getLink(IBaseBundle.LINK_NEXT));
String nextPageLink = bundle.getLink("next").getUrl();
@@ -126,9 +113,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport {
@Test
public void testPreviousWithEncodingEnum() throws Exception {
String url = "Patient?_count=2";
- Bundle bundle = this.fhirClient.search()
- .byUrl(url)
- .returnBundle(Bundle.class).execute();
+ Bundle bundle = this.fhirClient.search().byUrl(url).returnBundle(Bundle.class).execute();
assertNotNull(bundle.getLink(IBaseBundle.LINK_NEXT));
String nextPageLink = bundle.getLink("next").getUrl();
@@ -158,10 +143,7 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport {
input.add(new Patient().addName(new HumanName().setFamily("PATIENT3")));
- List<IBaseResource> response = fhirClient.transaction()
- .withResources(input)
- .encodedJson()
- .execute();
+ List<IBaseResource> response = fhirClient.transaction().withResources(input).encodedJson().execute();
assertEquals(3, response.size());
}
@@ -173,16 +155,13 @@ public class FhirLoadPageIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for byUrl
- from("direct://BY_URL")
- .to("fhir://" + PATH_PREFIX + "/byUrl");
+ from("direct://BY_URL").to("fhir://" + PATH_PREFIX + "/byUrl");
// test route for next
- from("direct://NEXT")
- .to("fhir://" + PATH_PREFIX + "/next?inBody=bundle");
+ from("direct://NEXT").to("fhir://" + PATH_PREFIX + "/next?inBody=bundle");
// test route for previous
- from("direct://PREVIOUS")
- .to("fhir://" + PATH_PREFIX + "/previous?inBody=bundle");
+ from("direct://PREVIOUS").to("fhir://" + PATH_PREFIX + "/previous?inBody=bundle");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java
index 198b8bd5627..5cfeb20d593 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirMetaIT.java
@@ -45,24 +45,18 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirMetaIT.class,
- FhirMetaIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirMetaIT.class, FhirMetaIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirMetaIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirMetaIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirMetaApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirMetaApiMethod.class)
+ .getName();
@Test
public void testAdd() throws Exception {
- //assert no meta
+ // assert no meta
Meta meta = fhirClient.meta().get(Meta.class).fromResource(this.patient.getIdElement()).execute();
assertEquals(0, meta.getTag().size());
Meta inMeta = new Meta();
@@ -82,7 +76,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport {
@Test
public void testDelete() throws Exception {
- //assert no meta
+ // assert no meta
Meta meta = fhirClient.meta().get(Meta.class).fromResource(this.patient.getIdElement()).execute();
assertEquals(0, meta.getTag().size());
Meta inMeta = new Meta();
@@ -91,7 +85,7 @@ public class FhirMetaIT extends AbstractFhirTestSupport {
meta = fhirClient.meta().add().onResource(this.patient.getIdElement()).meta(inMeta).execute();
assertEquals(1, meta.getTag().size());
- //delete meta
+ // delete meta
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseMetaType
headers.put("CamelFhir.meta", meta);
@@ -165,24 +159,19 @@ public class FhirMetaIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for add
- from("direct://ADD")
- .to("fhir://" + PATH_PREFIX + "/add");
+ from("direct://ADD").to("fhir://" + PATH_PREFIX + "/add");
// test route for delete
- from("direct://DELETE")
- .to("fhir://" + PATH_PREFIX + "/delete");
+ from("direct://DELETE").to("fhir://" + PATH_PREFIX + "/delete");
// test route for getFromResource
- from("direct://GET_FROM_RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/getFromResource");
+ from("direct://GET_FROM_RESOURCE").to("fhir://" + PATH_PREFIX + "/getFromResource");
// test route for getFromServer
- from("direct://GET_FROM_SERVER")
- .to("fhir://" + PATH_PREFIX + "/getFromServer?inBody=metaType");
+ from("direct://GET_FROM_SERVER").to("fhir://" + PATH_PREFIX + "/getFromServer?inBody=metaType");
// test route for getFromType
- from("direct://GET_FROM_TYPE")
- .to("fhir://" + PATH_PREFIX + "/getFromType");
+ from("direct://GET_FROM_TYPE").to("fhir://" + PATH_PREFIX + "/getFromType");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java
index 186e7dd6d64..2b055211362 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirOperationIT.java
@@ -45,21 +45,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirOperationIT.class,
- FhirOperationIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirOperationIT.class,
+ FhirOperationIT.TestConfiguration.class, DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirOperationIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirOperationIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirOperationApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirOperationApiMethod.class)
+ .getName();
@Test
public void testOnInstance() throws Exception {
@@ -151,14 +144,15 @@ public class FhirOperationIT extends AbstractFhirTestSupport {
// parameter type is java.util.Map
headers.put("CamelFhir.extraParameters", null);
- final org.hl7.fhir.instance.model.api.IBaseResource result = requestBodyAndHeaders("direct://ON_TYPE", null, headers);
+ final org.hl7.fhir.instance.model.api.IBaseResource result = requestBodyAndHeaders("direct://ON_TYPE", null,
+ headers);
assertNotNull(result, "onType result");
LOG.debug("onType: {}", result);
}
@Disabled("Not implemented yet in HAPI FHIR server side, see"
- + " https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoMessageHeaderDstu3.java#L33")
+ + " https://github.com/jamesagnew/hapi-fhir/blob/master/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/dstu3/FhirResourceDaoMessageHeaderDstu3.java#L33")
@Test
public void testProcessMessage() throws Exception {
final Map<String, Object> headers = new HashMap<>();
@@ -172,8 +166,8 @@ public class FhirOperationIT extends AbstractFhirTestSupport {
// parameter type is java.util.Map
headers.put("CamelFhir.extraParameters", null);
- final org.hl7.fhir.instance.model.api.IBaseBundle result
- = requestBodyAndHeaders("direct://PROCESS_MESSAGE", null, headers);
+ final org.hl7.fhir.instance.model.api.IBaseBundle result = requestBodyAndHeaders("direct://PROCESS_MESSAGE",
+ null, headers);
assertNotNull(result, "processMessage result");
LOG.debug("processMessage: {}", result);
@@ -187,24 +181,19 @@ public class FhirOperationIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for onInstance
- from("direct://ON_INSTANCE")
- .to("fhir://" + PATH_PREFIX + "/onInstance");
+ from("direct://ON_INSTANCE").to("fhir://" + PATH_PREFIX + "/onInstance");
// test route for onInstanceVersion
- from("direct://ON_INSTANCE_VERSION")
- .to("fhir://" + PATH_PREFIX + "/onInstanceVersion");
+ from("direct://ON_INSTANCE_VERSION").to("fhir://" + PATH_PREFIX + "/onInstanceVersion");
// test route for onServer
- from("direct://ON_SERVER")
- .to("fhir://" + PATH_PREFIX + "/onServer");
+ from("direct://ON_SERVER").to("fhir://" + PATH_PREFIX + "/onServer");
// test route for onType
- from("direct://ON_TYPE")
- .to("fhir://" + PATH_PREFIX + "/onType");
+ from("direct://ON_TYPE").to("fhir://" + PATH_PREFIX + "/onType");
// test route for processMessage
- from("direct://PROCESS_MESSAGE")
- .to("fhir://" + PATH_PREFIX + "/processMessage");
+ from("direct://PROCESS_MESSAGE").to("fhir://" + PATH_PREFIX + "/processMessage");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java
index ccdafe47079..94227e05a90 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirPatchIT.java
@@ -49,20 +49,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirPatchIT.class,
- FhirPatchIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirPatchIT.class, FhirPatchIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirPatchIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirPatchIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirPatchApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirPatchApiMethod.class)
+ .getName();
private static final String PATCH = "[ { \"op\":\"replace\", \"path\":\"/active\", \"value\":true } ]";
@Test
@@ -138,16 +132,13 @@ public class FhirPatchIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for patchById
- from("direct://PATCH_BY_ID")
- .to("fhir://" + PATH_PREFIX + "/patchById");
+ from("direct://PATCH_BY_ID").to("fhir://" + PATH_PREFIX + "/patchById");
// test route for patchBySId
- from("direct://PATCH_BY_SID")
- .to("fhir://" + PATH_PREFIX + "/patchById");
+ from("direct://PATCH_BY_SID").to("fhir://" + PATH_PREFIX + "/patchById");
// test route for patchByUrl
- from("direct://PATCH_BY_URL")
- .to("fhir://" + PATH_PREFIX + "/patchByUrl");
+ from("direct://PATCH_BY_URL").to("fhir://" + PATH_PREFIX + "/patchByUrl");
}
};
}
@@ -157,7 +148,8 @@ public class FhirPatchIT extends AbstractFhirTestSupport {
LOG.debug("result: {}", result);
IIdType id = result.getId();
- Patient patient = fhirClient.read().resource(Patient.class).withId(id).preferResponseType(Patient.class).execute();
+ Patient patient = fhirClient.read().resource(Patient.class).withId(id).preferResponseType(Patient.class)
+ .execute();
assertTrue(patient.getActive());
}
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java
index 932d9930688..58124a07088 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirReadIT.java
@@ -44,20 +44,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirReadIT.class,
- FhirReadIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirReadIT.class, FhirReadIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirReadIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirReadIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirReadApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirReadApiMethod.class)
+ .getName();
@Test
public void testResourceById() throws Exception {
@@ -162,7 +156,8 @@ public class FhirReadIT extends AbstractFhirTestSupport {
// parameter type is String
headers.put("CamelFhir.version", patient.getIdElement().getVersionIdPart());
- Patient result = requestBodyAndHeaders("direct://RESOURCE_BY_STRING_ID_AND_VERSION_AND_STRING_RESOURCE", null, headers);
+ Patient result = requestBodyAndHeaders("direct://RESOURCE_BY_STRING_ID_AND_VERSION_AND_STRING_RESOURCE", null,
+ headers);
assertValidResponse(result);
}
@@ -247,20 +242,16 @@ public class FhirReadIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for resourceById
- from("direct://RESOURCE_BY_ID")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_ID").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
- from("direct://RESOURCE_BY_LONG_ID")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_LONG_ID").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
- from("direct://RESOURCE_BY_STRING_ID")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_STRING_ID").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
- from("direct://RESOURCE_BY_ID_AND_STRING_RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_ID_AND_STRING_RESOURCE").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
from("direct://RESOURCE_BY_LONG_ID_AND_STRING_RESOURCE")
@@ -271,28 +262,24 @@ public class FhirReadIT extends AbstractFhirTestSupport {
.to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
- from("direct://RESOURCE_BY_STRING_ID_AND_VERSION")
- .to("fhir://" + PATH_PREFIX + "/resourceById");
+ from("direct://RESOURCE_BY_STRING_ID_AND_VERSION").to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceById
from("direct://RESOURCE_BY_STRING_ID_AND_VERSION_AND_STRING_RESOURCE")
.to("fhir://" + PATH_PREFIX + "/resourceById");
// test route for resourceByUrl
- from("direct://RESOURCE_BY_IURL")
- .to("fhir://" + PATH_PREFIX + "/resourceByUrl");
+ from("direct://RESOURCE_BY_IURL").to("fhir://" + PATH_PREFIX + "/resourceByUrl");
// test route for resourceByUrl
- from("direct://RESOURCE_BY_URL")
- .to("fhir://" + PATH_PREFIX + "/resourceByUrl");
+ from("direct://RESOURCE_BY_URL").to("fhir://" + PATH_PREFIX + "/resourceByUrl");
// test route for resourceByUrl
from("direct://RESOURCE_BY_STRING_URL_AND_STRING_RESOURCE")
.to("fhir://" + PATH_PREFIX + "/resourceByUrl");
// test route for resourceByUrl
- from("direct://RESOURCE_BY_URL_AND_STRING_RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resourceByUrl");
+ from("direct://RESOURCE_BY_URL_AND_STRING_RESOURCE").to("fhir://" + PATH_PREFIX + "/resourceByUrl");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java
index 39b9248d665..38fd2a2402d 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSearchIT.java
@@ -41,20 +41,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirSearchIT.class,
- FhirSearchIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirSearchIT.class, FhirSearchIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirSearchIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirSearchIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirSearchApiMethod.class)
+ .getName();
@Test
public void testSearchByUrl() throws Exception {
@@ -76,8 +70,7 @@ public class FhirSearchIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for searchByUrl
- from("direct://SEARCH_BY_URL")
- .to("fhir://" + PATH_PREFIX + "/searchByUrl?inBody=url");
+ from("direct://SEARCH_BY_URL").to("fhir://" + PATH_PREFIX + "/searchByUrl?inBody=url");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirServer.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirServer.java
index 38593376b12..1fcae27e46f 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirServer.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirServer.java
@@ -29,16 +29,17 @@ import org.springframework.context.annotation.Bean;
public class FhirServer {
@Bean
- FhirContext fhirContext(){
+ FhirContext fhirContext() {
FhirContext fhirContext = new FhirContext(FhirVersionEnum.R4);
fhirContext.getRestfulClientFactory().setSocketTimeout(20 * 1000);
// Set proxy so that FHIR resource URLs returned by the server are using the correct host and port
- fhirContext.getRestfulClientFactory().setProxy(AbstractFhirTestSupport.service.getHost(), AbstractFhirTestSupport.service.getPort());
+ fhirContext.getRestfulClientFactory().setProxy(AbstractFhirTestSupport.service.getHost(),
+ AbstractFhirTestSupport.service.getPort());
return fhirContext;
}
@Bean
- IGenericClient fhirClient(FhirContext fc){
- return fc.newRestfulGenericClient(AbstractFhirTestSupport.service.getServiceBaseURL());
+ IGenericClient fhirClient(FhirContext fc) {
+ return fc.newRestfulGenericClient(AbstractFhirTestSupport.service.getServiceBaseURL());
}
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java
index 114c6e354d0..04d6928d92c 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirSimpleIT.java
@@ -41,18 +41,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirSimpleIT.class,
- FhirSimpleIT.TestConfiguration.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirSimpleIT.class, FhirSimpleIT.TestConfiguration.class,
+ FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirSimpleIT extends AbstractFhirTestSupport {
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirCreateApiMethod.class)
+ .getName();
private static final String GIVEN_NAME = UUID.randomUUID().toString();
private static final String FAMILY_NAME = UUID.randomUUID().toString();
@@ -79,9 +74,8 @@ public class FhirSimpleIT extends AbstractFhirTestSupport {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct://RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resource?inBody=resource&serverUrl=" + service.getServiceBaseURL()
- + "&fhirVersion=R4");
+ from("direct://RESOURCE").to("fhir://" + PATH_PREFIX + "/resource?inBody=resource&serverUrl="
+ + service.getServiceBaseURL() + "&fhirVersion=R4");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java
index a3687fb96bb..ccc2e53b5f7 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirTransactionIT.java
@@ -50,21 +50,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirTransactionIT.class,
- FhirTransactionIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirTransactionIT.class,
+ FhirTransactionIT.TestConfiguration.class, DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirTransactionIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirTransactionIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirTransactionApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection()
+ .getApiName(FhirTransactionApiMethod.class).getName();
@Test
public void testWithBundle() throws Exception {
@@ -131,16 +124,13 @@ public class FhirTransactionIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for withBundle
- from("direct://WITH_BUNDLE")
- .to("fhir://" + PATH_PREFIX + "/withBundle?inBody=bundle");
+ from("direct://WITH_BUNDLE").to("fhir://" + PATH_PREFIX + "/withBundle?inBody=bundle");
// test route for withBundle
- from("direct://WITH_STRING_BUNDLE")
- .to("fhir://" + PATH_PREFIX + "/withBundle?inBody=stringBundle");
+ from("direct://WITH_STRING_BUNDLE").to("fhir://" + PATH_PREFIX + "/withBundle?inBody=stringBundle");
// test route for withResources
- from("direct://WITH_RESOURCES")
- .to("fhir://" + PATH_PREFIX + "/withResources?inBody=resources");
+ from("direct://WITH_RESOURCES").to("fhir://" + PATH_PREFIX + "/withResources?inBody=resources");
}
};
}
@@ -149,10 +139,8 @@ public class FhirTransactionIT extends AbstractFhirTestSupport {
private Bundle createTransactionBundle() {
Bundle input = new Bundle();
input.setType(Bundle.BundleType.TRANSACTION);
- input.addEntry()
- .setResource(new Patient().addName(new HumanName().addGiven("Art").setFamily("Tatum")))
- .getRequest()
- .setMethod(Bundle.HTTPVerb.POST);
+ input.addEntry().setResource(new Patient().addName(new HumanName().addGiven("Art").setFamily("Tatum")))
+ .getRequest().setMethod(Bundle.HTTPVerb.POST);
return input;
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java
index b46b577aa09..a0b46e2b5d3 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirUpdateIT.java
@@ -47,20 +47,14 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirUpdateIT.class,
- FhirUpdateIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirUpdateIT.class, FhirUpdateIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirUpdateIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirUpdateIT.class);
- private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirUpdateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirUpdateApiMethod.class)
+ .getName();
@Test
public void testResource() throws Exception {
@@ -127,7 +121,8 @@ public class FhirUpdateIT extends AbstractFhirTestSupport {
this.patient.setBirthDate(date);
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseResource
- headers.put("CamelFhir.resourceAsString", this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
+ headers.put("CamelFhir.resourceAsString",
+ this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
// parameter type is org.hl7.fhir.instance.model.api.IIdType
headers.put("CamelFhir.id", this.patient.getIdElement());
// parameter type is ca.uhn.fhir.rest.api.PreferReturnEnum
@@ -147,7 +142,8 @@ public class FhirUpdateIT extends AbstractFhirTestSupport {
this.patient.setBirthDate(date);
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseResource
- headers.put("CamelFhir.resourceAsString", this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
+ headers.put("CamelFhir.resourceAsString",
+ this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
// parameter type is org.hl7.fhir.instance.model.api.IIdType
headers.put("CamelFhir.stringId", this.patient.getIdElement().getIdPart());
// parameter type is ca.uhn.fhir.rest.api.PreferReturnEnum
@@ -189,13 +185,15 @@ public class FhirUpdateIT extends AbstractFhirTestSupport {
String url = "Patient?" + Patient.SP_RES_ID + '=' + patient.getIdPart();
final Map<String, Object> headers = new HashMap<>();
// parameter type is org.hl7.fhir.instance.model.api.IBaseResource
- headers.put("CamelFhir.resourceAsString", this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
+ headers.put("CamelFhir.resourceAsString",
+ this.fhirContext.newJsonParser().encodeResourceToString(this.patient));
// parameter type is String
headers.put("CamelFhir.url", url);
// parameter type is ca.uhn.fhir.rest.api.PreferReturnEnum
headers.put("CamelFhir.preferReturn", PreferReturnEnum.REPRESENTATION);
- MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_BY_SEARCH_URL_AND_RESOURCE_AS_STRING", null, headers);
+ MethodOutcome result = requestBodyAndHeaders("direct://RESOURCE_BY_SEARCH_URL_AND_RESOURCE_AS_STRING", null,
+ headers);
assertNotNull(result, "resource result");
LOG.debug("resource: {}", result);
@@ -210,24 +208,19 @@ public class FhirUpdateIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for resource
- from("direct://RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resource");
+ from("direct://RESOURCE").to("fhir://" + PATH_PREFIX + "/resource");
// test route for resource
- from("direct://RESOURCE_WITH_STRING_ID")
- .to("fhir://" + PATH_PREFIX + "/resource");
+ from("direct://RESOURCE_WITH_STRING_ID").to("fhir://" + PATH_PREFIX + "/resource");
// test route for resource
- from("direct://RESOURCE_AS_STRING")
- .to("fhir://" + PATH_PREFIX + "/resource");
+ from("direct://RESOURCE_AS_STRING").to("fhir://" + PATH_PREFIX + "/resource");
// test route for resource
- from("direct://RESOURCE_AS_STRING_WITH_STRING_ID")
- .to("fhir://" + PATH_PREFIX + "/resource");
+ from("direct://RESOURCE_AS_STRING_WITH_STRING_ID").to("fhir://" + PATH_PREFIX + "/resource");
// test route for resourceBySearchUrl
- from("direct://RESOURCE_BY_SEARCH_URL")
- .to("fhir://" + PATH_PREFIX + "/resourceBySearchUrl");
+ from("direct://RESOURCE_BY_SEARCH_URL").to("fhir://" + PATH_PREFIX + "/resourceBySearchUrl");
// test route for resourceBySearchUrl
from("direct://RESOURCE_BY_SEARCH_URL_AND_RESOURCE_AS_STRING")
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java
index 9b401b3023e..3c251264076 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/FhirValidateIT.java
@@ -47,21 +47,14 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirValidateIT.class,
- FhirValidateIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirValidateIT.class, FhirValidateIT.TestConfiguration.class,
+ DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class FhirValidateIT extends AbstractFhirTestSupport {
private static final Logger LOG = LoggerFactory.getLogger(FhirValidateIT.class);
- private static final String PATH_PREFIX
- = FhirApiCollection.getCollection().getApiName(FhirValidateApiMethod.class).getName();
+ private static final String PATH_PREFIX = FhirApiCollection.getCollection().getApiName(FhirValidateApiMethod.class)
+ .getName();
@Test
public void testResource() throws Exception {
@@ -80,8 +73,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport {
List<OperationOutcome.OperationOutcomeIssueComponent> issue = operationOutcome.getIssue();
assertNotNull(issue);
assertEquals(1, issue.size());
- assertTrue(issue.get(0).getDiagnostics()
- .contains("No issues detected during validation"));
+ assertTrue(issue.get(0).getDiagnostics().contains("No issues detected during validation"));
}
@Test
@@ -91,8 +83,8 @@ public class FhirValidateIT extends AbstractFhirTestSupport {
bobbyHebb.getText().setDivAsString("<div>This is the narrative text</div>");
// using org.hl7.fhir.instance.model.api.IBaseResource message body for single parameter "resource"
- MethodOutcome result
- = requestBody("direct://RESOURCE_AS_STRING", this.fhirContext.newXmlParser().encodeResourceToString(bobbyHebb));
+ MethodOutcome result = requestBody("direct://RESOURCE_AS_STRING",
+ this.fhirContext.newXmlParser().encodeResourceToString(bobbyHebb));
assertNotNull(result, "resource result");
LOG.debug("resource: {}", result);
@@ -102,8 +94,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport {
List<OperationOutcome.OperationOutcomeIssueComponent> issue = operationOutcome.getIssue();
assertNotNull(issue);
assertEquals(1, issue.size());
- assertTrue(issue.get(0).getDiagnostics()
- .contains("No issues detected during validation"));
+ assertTrue(issue.get(0).getDiagnostics().contains("No issues detected during validation"));
}
@Configuration
@@ -114,8 +105,7 @@ public class FhirValidateIT extends AbstractFhirTestSupport {
@Override
public void configure() {
// test route for resource
- from("direct://RESOURCE")
- .to("fhir://" + PATH_PREFIX + "/resource?inBody=resource");
+ from("direct://RESOURCE").to("fhir://" + PATH_PREFIX + "/resource?inBody=resource");
// test route for resource
from("direct://RESOURCE_AS_STRING")
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java
index f1476515dfc..e906b02dc80 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/Hl7v2PatientToFhirPatientIT.java
@@ -40,41 +40,29 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- Hl7v2PatientToFhirPatientIT.class,
- Hl7v2PatientToFhirPatientIT.TestConfiguration.class,
- DefaultCamelContext.class,
- FhirServer.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, Hl7v2PatientToFhirPatientIT.class,
+ Hl7v2PatientToFhirPatientIT.TestConfiguration.class, DefaultCamelContext.class, FhirServer.class, })
@DisabledIfSystemProperty(named = "ci.env.name", matches = "github.com", disabledReason = "Disabled on GH Action due to Docker limit")
public class Hl7v2PatientToFhirPatientIT extends AbstractFhirTestSupport {
/*
- Segment Purpose FHIR Resource
- MSH Message header MessageHeader
- PID Patient Identification Patient
- PV1 Patient Visit Not used in this example
- PV2 Patient Visit – Additional data Not used in this example
- ORC Common Order Not used in this example
- OBR Observation Request Observation
- OBX Observation ObservationProvider
-
- See https://fhirblog.com/2014/10/05/mapping-hl7-version-2-to-fhir-messages for more information
- */
+ * Segment Purpose FHIR Resource MSH Message header MessageHeader PID Patient Identification Patient PV1 Patient
+ * Visit Not used in this example PV2 Patient Visit – Additional data Not used in this example ORC Common Order Not
+ * used in this example OBR Observation Request Observation OBX Observation ObservationProvider
+ *
+ * See https://fhirblog.com/2014/10/05/mapping-hl7-version-2-to-fhir-messages for more information
+ */
private static final String HL7_MESSAGE = "MSH|^~\\&|Amalga HIS|BUM|New Tester|MS|20111121103141||ORU^R01|2847970-2"
- + "01111211031|P|2.4|||AL|NE|764|ASCII|||\r"
- + "PID||100005056|100005056||Freeman^Vincent^\"\"^^\"\"|\"\"|19810813000000|F||CA|Street 1^\"\"^\"\"^\"\"^34000^SGP^^"
- + "\"\"~\"\"^\"\"^\"\"^\"\"^Danling Street 5th^THA^^\"\"||326-2275^PRN^PH^^66^675~476-5059^ORN^CP^^66^359~(123)"
- + "456-7890^ORN^FX^^66^222~^NET^X.400^a@a.a~^NET^X.400^dummy@hotmail.com|(123)456-7890^WPN^PH^^66|UNK|S|BUD||BP000111899|"
- + "D99999^\"\"||CA|Bangkok|||THA||THA|\"\"|N\r"
- + "PV1||OPD ||||\"\"^\"\"^\"\"||||CNSLT|||||C|VIP|||6262618|PB1||||||||||||||||||||||||20101208134638\r"
- + "PV2|||^Unknown|\"\"^\"\"||||\"\"|\"\"|0||\"\"|||||||||||||||||||||||||||||HP1\r"
- + "ORC|NW|\"\"|BMC1102771601|\"\"|CM||^^^^^\"\"|||||||||\"\"^\"\"^^^\"\"\r"
- + "OBR|1|\"\"|BMC1102771601|\"\"^Brain (CT)||20111028124215||||||||||||||||||CTSCAN|F||^^^^^ROUTINE|||\"\"||||||\"\"|||||||||||^\"\"\r"
- + "OBX|1|FT|\"\"^Brain (CT)||++++ text of report goes here +++|||REQAT|||FINAL|||20111121103040||75929^Gosselin^Angelina";
+ + "01111211031|P|2.4|||AL|NE|764|ASCII|||\r"
+ + "PID||100005056|100005056||Freeman^Vincent^\"\"^^\"\"|\"\"|19810813000000|F||CA|Street 1^\"\"^\"\"^\"\"^34000^SGP^^"
+ + "\"\"~\"\"^\"\"^\"\"^\"\"^Danling Street 5th^THA^^\"\"||326-2275^PRN^PH^^66^675~476-5059^ORN^CP^^66^359~(123)"
+ + "456-7890^ORN^FX^^66^222~^NET^X.400^a@a.a~^NET^X.400^dummy@hotmail.com|(123)456-7890^WPN^PH^^66|UNK|S|BUD||BP000111899|"
+ + "D99999^\"\"||CA|Bangkok|||THA||THA|\"\"|N\r"
+ + "PV1||OPD ||||\"\"^\"\"^\"\"||||CNSLT|||||C|VIP|||6262618|PB1||||||||||||||||||||||||20101208134638\r"
+ + "PV2|||^Unknown|\"\"^\"\"||||\"\"|\"\"|0||\"\"|||||||||||||||||||||||||||||HP1\r"
+ + "ORC|NW|\"\"|BMC1102771601|\"\"|CM||^^^^^\"\"|||||||||\"\"^\"\"^^^\"\"\r"
+ + "OBR|1|\"\"|BMC1102771601|\"\"^Brain (CT)||20111028124215||||||||||||||||||CTSCAN|F||^^^^^ROUTINE|||\"\"||||||\"\"|||||||||||^\"\"\r"
+ + "OBX|1|FT|\"\"^Brain (CT)||++++ text of report goes here +++|||REQAT|||FINAL|||20111121103040||75929^Gosselin^Angelina";
@Test
public void testUnmarshalWithExplicitUTF16Charset() throws Exception {
@@ -101,11 +89,8 @@ public class Hl7v2PatientToFhirPatientIT extends AbstractFhirTestSupport {
@Override
public void configure() {
Processor patientProcessor = new PatientProcessor();
- from("direct:input")
- .unmarshal().hl7()
- .process(patientProcessor)
- .to("fhir://create/resource?inBody=resource")
- .to("mock:result");
+ from("direct:input").unmarshal().hl7().process(patientProcessor)
+ .to("fhir://create/resource?inBody=resource").to("mock:result");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java
index c7f8457e2f4..8203d3e3a5e 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/PatientProcessor.java
@@ -31,7 +31,7 @@ public class PatientProcessor implements Processor {
@Override
public void process(Exchange exchange) throws Exception {
ORU_R01 msg = exchange.getIn().getBody(ORU_R01.class);
- //map to Patient
+ // map to Patient
Patient patient = getPatient(msg);
exchange.getIn().setBody(patient);
}
@@ -45,8 +45,7 @@ public class PatientProcessor implements Processor {
String surname = pid.getPatientName()[0].getFamilyName().getFn1_Surname().getValue();
String name = pid.getPatientName()[0].getGivenName().getValue();
String patientId = msg.getPATIENT_RESULT().getPATIENT().getPID().getPatientID().getCx1_ID().getValue();
- patient.addName()
- .addGiven(name);
+ patient.addName().addGiven(name);
patient.getNameFirstRep().setFamily(surname);
patient.setId(patientId);
return patient;
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataFormatTest.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataFormatTest.java
index 8e9f701111e..4b440acbb8f 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataFormatTest.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataFormatTest.java
@@ -43,18 +43,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirJsonDataFormatTest.class,
- FhirJsonDataFormatTest.TestConfiguration.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirJsonDataFormatTest.class,
+ FhirJsonDataFormatTest.TestConfiguration.class, })
public class FhirJsonDataFormatTest {
private static final String PATIENT = "{\"resourceType\":\"Patient\","
- + "\"name\":[{\"family\":\"Holmes\",\"given\":[\"Sherlock\"]}],"
- + "\"address\":[{\"line\":[\"221b Baker St, Marylebone, London NW1 6XE, UK\"]}]}";
+ + "\"name\":[{\"family\":\"Holmes\",\"given\":[\"Sherlock\"]}],"
+ + "\"address\":[{\"line\":[\"221b Baker St, Marylebone, London NW1 6XE, UK\"]}]}";
private MockEndpoint mockEndpoint;
@@ -94,7 +89,8 @@ public class FhirJsonDataFormatTest {
Exchange exchange = mockEndpoint.getExchanges().get(0);
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
- IBaseResource iBaseResource = FhirContext.forR4().newJsonParser().parseResource(new InputStreamReader(inputStream));
+ IBaseResource iBaseResource = FhirContext.forR4().newJsonParser()
+ .parseResource(new InputStreamReader(inputStream));
assertTrue(patient.equalsDeep((Base) iBaseResource), "Patients should be equal!");
}
@@ -112,13 +108,9 @@ public class FhirJsonDataFormatTest {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:marshal")
- .marshal().fhirJson("R4")
- .to("mock:result");
+ from("direct:marshal").marshal().fhirJson("R4").to("mock:result");
- from("direct:unmarshal")
- .unmarshal().fhirJson()
- .to("mock:result");
+ from("direct:unmarshal").unmarshal().fhirJson().to("mock:result");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java
index d42359279db..874d125d029 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirJsonDataformatErrorHandlerTest.java
@@ -45,17 +45,11 @@ import static org.junit.jupiter.api.Assertions.fail;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirJsonDataformatErrorHandlerTest.class,
- FhirJsonDataformatErrorHandlerTest.TestConfiguration.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirJsonDataformatErrorHandlerTest.class,
+ FhirJsonDataformatErrorHandlerTest.TestConfiguration.class, })
public class FhirJsonDataformatErrorHandlerTest {
- private static final String INPUT
- = "{\"resourceType\":\"Patient\",\"extension\":[ {\"valueDateTime\":\"2011-01-02T11:13:15\"} ]}";
+ private static final String INPUT = "{\"resourceType\":\"Patient\",\"extension\":[ {\"valueDateTime\":\"2011-01-02T11:13:15\"} ]}";
private MockEndpoint mockEndpoint;
private final FhirContext fhirContext = FhirContext.forR4();
@@ -97,7 +91,6 @@ public class FhirJsonDataformatErrorHandlerTest {
assertEquals("2011-01-02T11:13:15", patient.getExtension().get(0).getValueAsPrimitive().getValueAsString());
}
-
@Configuration
public class TestConfiguration {
@Bean
@@ -108,12 +101,10 @@ public class FhirJsonDataformatErrorHandlerTest {
FhirJsonDataFormat strickErrorHandlerDataformat = getStrictErrorHandlerDataFormat();
FhirJsonDataFormat lenientErrorHandlerDataFormat = getLenientErrorHandlerDataFormat();
- from("direct:unmarshalErrorHandlerStrict")
- .unmarshal(strickErrorHandlerDataformat)
+ from("direct:unmarshalErrorHandlerStrict").unmarshal(strickErrorHandlerDataformat)
.to("mock:errorIsThrown");
- from("direct:unmarshalErrorHandlerLenient")
- .unmarshal(lenientErrorHandlerDataFormat)
+ from("direct:unmarshalErrorHandlerLenient").unmarshal(lenientErrorHandlerDataFormat)
.to("mock:result");
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataFormatTest.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataFormatTest.java
index 348f736ba60..54eeb06556a 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataFormatTest.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataFormatTest.java
@@ -43,19 +43,13 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirXmlDataFormatTest.class,
- FhirXmlDataFormatTest.TestConfiguration.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirXmlDataFormatTest.class,
+ FhirXmlDataFormatTest.TestConfiguration.class, })
public class FhirXmlDataFormatTest {
private static final String PATIENT = "<Patient xmlns=\"http://hl7.org/fhir\">"
- + "<name><family value=\"Holmes\"/><given value=\"Sherlock\"/></name>"
- + "<address><line value=\"221b Baker St, Marylebone, London NW1 6XE, UK\"/></address>"
- + "</Patient>";
+ + "<name><family value=\"Holmes\"/><given value=\"Sherlock\"/></name>"
+ + "<address><line value=\"221b Baker St, Marylebone, London NW1 6XE, UK\"/></address>" + "</Patient>";
private MockEndpoint mockEndpoint;
@Autowired
@@ -94,8 +88,8 @@ public class FhirXmlDataFormatTest {
Exchange exchange = mockEndpoint.getExchanges().get(0);
InputStream inputStream = exchange.getIn().getBody(InputStream.class);
- final IBaseResource iBaseResource
- = FhirContext.forR4().newXmlParser().parseResource(new InputStreamReader(inputStream));
+ final IBaseResource iBaseResource = FhirContext.forR4().newXmlParser()
+ .parseResource(new InputStreamReader(inputStream));
assertTrue(patient.equalsDeep((Base) iBaseResource), "Patients should be equal!");
}
@@ -113,13 +107,9 @@ public class FhirXmlDataFormatTest {
return new RouteBuilder() {
@Override
public void configure() {
- from("direct:marshal")
- .marshal().fhirXml()
- .to("mock:result");
+ from("direct:marshal").marshal().fhirXml().to("mock:result");
- from("direct:unmarshal")
- .unmarshal().fhirXml()
- .to("mock:result");
+ from("direct:unmarshal").unmarshal().fhirXml().to("mock:result");
}
};
}
diff --git a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java
index f92504f3d7c..cbd616c6026 100644
--- a/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java
+++ b/components-starter/camel-fhir-starter/src/test/java/org/apache/camel/component/fhir/dataformat/FhirXmlDataformatErrorHandlerTest.java
@@ -44,13 +44,8 @@ import static org.junit.jupiter.api.Assertions.fail;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FhirXmlDataformatErrorHandlerTest.class,
- FhirXmlDataformatErrorHandlerTest.TestConfiguration.class,
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FhirXmlDataformatErrorHandlerTest.class,
+ FhirXmlDataformatErrorHandlerTest.TestConfiguration.class, })
public class FhirXmlDataformatErrorHandlerTest {
private static final String INPUT = "<Patient><active value=\"true\"/><active value=\"false\"/></Patient>";
@@ -101,12 +96,10 @@ public class FhirXmlDataformatErrorHandlerTest {
FhirXmlDataFormat strickErrorHandlerDataformat = getStrictErrorHandlerDataFormat();
FhirXmlDataFormat lenientErrorHandlerDataFormat = getLenientErrorHandlerDataFormat();
- from("direct:unmarshalErrorHandlerStrict")
- .unmarshal(strickErrorHandlerDataformat)
+ from("direct:unmarshalErrorHandlerStrict").unmarshal(strickErrorHandlerDataformat)
.to("mock:errorIsThrown");
- from("direct:unmarshalErrorHandlerLenient")
- .unmarshal(lenientErrorHandlerDataFormat)
+ from("direct:unmarshalErrorHandlerLenient").unmarshal(lenientErrorHandlerDataFormat)
.to("mock:result");
}
diff --git a/components-starter/camel-file-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java b/components-starter/camel-file-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
index f2efc6ddedc..cb46d18fea5 100644
--- a/components-starter/camel-file-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
+++ b/components-starter/camel-file-starter/src/main/java/org/apache/camel/component/file/springboot/cluster/FileLockClusterServiceAutoConfiguration.java
@@ -46,20 +46,14 @@ public class FileLockClusterServiceAutoConfiguration {
public CamelClusterService fileClusterService() throws Exception {
FileLockClusterService service = new FileLockClusterService();
- Optional.ofNullable(configuration.getId())
- .ifPresent(service::setId);
- Optional.ofNullable(configuration.getRoot())
- .ifPresent(service::setRoot);
- Optional.ofNullable(configuration.getOrder())
- .ifPresent(service::setOrder);
- Optional.ofNullable(configuration.getAttributes())
- .ifPresent(service::setAttributes);
- Optional.ofNullable(configuration.getAcquireLockDelay())
- .map(TimePatternConverter::toMilliSeconds)
- .ifPresent(v -> service.setAcquireLockDelay(v, TimeUnit.MILLISECONDS));
- Optional.ofNullable(configuration.getAcquireLockInterval())
- .map(TimePatternConverter::toMilliSeconds)
- .ifPresent(v -> service.setAcquireLockInterval(v, TimeUnit.MILLISECONDS));
+ Optional.ofNullable(configuration.getId()).ifPresent(service::setId);
+ Optional.ofNullable(configuration.getRoot()).ifPresent(service::setRoot);
+ Optional.ofNullable(configuration.getOrder()).ifPresent(service::setOrder);
+ Optional.ofNullable(configuration.getAttributes()).ifPresent(service::setAttributes);
+ Optional.ofNullable(configuration.getAcquireLockDelay()).map(TimePatternConverter::toMilliSeconds)
+ .ifPresent(v -> service.setAcquireLockDelay(v, TimeUnit.MILLISECONDS));
+ Optional.ofNullable(configuration.getAcquireLockInterval()).map(TimePatternConverter::toMilliSeconds)
+ .ifPresent(v -> service.setAcquireLockInterval(v, TimeUnit.MILLISECONDS));
return service;
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
index 623e02617e5..a3245074f3c 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
@@ -35,13 +35,8 @@ import java.io.File;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- AntPathMatcherGenericFileFilterTest.class,
- AntPathMatcherGenericFileFilterTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, AntPathMatcherGenericFileFilterTest.class,
+ AntPathMatcherGenericFileFilterTest.TestConfiguration.class })
public class AntPathMatcherGenericFileFilterTest extends BaseFile {
@EndpointInject("mock:result")
@@ -76,8 +71,7 @@ public class AntPathMatcherGenericFileFilterTest extends BaseFile {
public void configure() {
from(fileUri(
"files/ant-path?initialDelay=0&delay=10&recursive=true&antInclude=**/*.txt&antFilterCaseSensitive=true"))
- .convertBodyTo(String.class)
- .to("mock:result");
+ .convertBodyTo(String.class).to("mock:result");
}
};
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/BaseFile.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/BaseFile.java
index 19064ecbf87..5e4eed95485 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/BaseFile.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/BaseFile.java
@@ -56,12 +56,12 @@ public class BaseFile {
oneExchangeDone = new NotifyBuilder(context).whenDone(1).create();
}
- //-------------------- assertions from testSupport ------------------------------
+ // -------------------- assertions from testSupport ------------------------------
/**
* To be used to check is a file is found in the file system
*/
- public static void assertFileExists(Path file, String content) throws IOException {
+ public static void assertFileExists(Path file, String content) throws IOException {
assertTrue(Files.exists(file), "File " + file + " should exist");
assertTrue(Files.isRegularFile(file), "File " + file + " should be a file");
assertEquals(content, new String(Files.readAllBytes(file)), "File " + file + " has unexpected content");
@@ -104,8 +104,7 @@ public class BaseFile {
}
}
-
- //--------------------- from TestSupport ------------------------------------
+ // --------------------- from TestSupport ------------------------------------
protected static final String LS = System.lineSeparator();
protected boolean testDirectoryCleaned;
@@ -145,7 +144,6 @@ public class BaseFile {
return testDirectory().resolve(dir);
}
-
protected Path testDirectory(String dir) {
return testDirectory(dir, false);
}
@@ -165,7 +163,8 @@ public class BaseFile {
/**
* Recursively delete a directory, useful to zapping test data
*
- * @param file the directory to be deleted
+ * @param file
+ * the directory to be deleted
*/
public static void deleteDirectory(File file) {
if (file.isDirectory()) {
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
index 93cc4c26ebc..a917cd34b1c 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBeginFailureOneTimeTest.java
@@ -34,13 +34,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileBeginFailureOneTimeTest.class,
- FileBeginFailureOneTimeTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileBeginFailureOneTimeTest.class,
+ FileBeginFailureOneTimeTest.TestConfiguration.class })
public class FileBeginFailureOneTimeTest extends BaseFile {
private static MyStrategy myStrategy = new MyStrategy();
@@ -64,16 +59,13 @@ public class FileBeginFailureOneTimeTest extends BaseFile {
private volatile int invoked;
@Override
- public void prepareOnStartup(
- GenericFileOperations<File> fileGenericFileOperations, GenericFileEndpoint<File> fileGenericFileEndpoint)
- throws Exception {
+ public void prepareOnStartup(GenericFileOperations<File> fileGenericFileOperations,
+ GenericFileEndpoint<File> fileGenericFileEndpoint) throws Exception {
}
@Override
- public boolean begin(
- GenericFileOperations<File> fileGenericFileOperations, GenericFileEndpoint<File> fileGenericFileEndpoint,
- Exchange exchange,
- GenericFile<File> fileGenericFile)
+ public boolean begin(GenericFileOperations<File> fileGenericFileOperations,
+ GenericFileEndpoint<File> fileGenericFileEndpoint, Exchange exchange, GenericFile<File> fileGenericFile)
throws Exception {
invoked++;
if (invoked <= 1) {
@@ -83,27 +75,21 @@ public class FileBeginFailureOneTimeTest extends BaseFile {
}
@Override
- public void abort(
- GenericFileOperations<File> fileGenericFileOperations, GenericFileEndpoint<File> fileGenericFileEndpoint,
- Exchange exchange,
- GenericFile<File> fileGenericFile)
+ public void abort(GenericFileOperations<File> fileGenericFileOperations,
+ GenericFileEndpoint<File> fileGenericFileEndpoint, Exchange exchange, GenericFile<File> fileGenericFile)
throws Exception {
// noop
}
@Override
- public void commit(
- GenericFileOperations<File> fileGenericFileOperations, GenericFileEndpoint<File> fileGenericFileEndpoint,
- Exchange exchange,
- GenericFile<File> fileGenericFile)
+ public void commit(GenericFileOperations<File> fileGenericFileOperations,
+ GenericFileEndpoint<File> fileGenericFileEndpoint, Exchange exchange, GenericFile<File> fileGenericFile)
throws Exception {
}
@Override
- public void rollback(
- GenericFileOperations<File> fileGenericFileOperations, GenericFileEndpoint<File> fileGenericFileEndpoint,
- Exchange exchange,
- GenericFile<File> fileGenericFile)
+ public void rollback(GenericFileOperations<File> fileGenericFileOperations,
+ GenericFileEndpoint<File> fileGenericFileEndpoint, Exchange exchange, GenericFile<File> fileGenericFile)
throws Exception {
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBridgeErrorHandlerTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBridgeErrorHandlerTest.java
index b096be2cf67..25d4e6d4dda 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBridgeErrorHandlerTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBridgeErrorHandlerTest.java
@@ -30,13 +30,8 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileBridgeErrorHandlerTest.class,
- FileBridgeErrorHandlerTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileBridgeErrorHandlerTest.class,
+ FileBridgeErrorHandlerTest.TestConfiguration.class })
public class FileBridgeErrorHandlerTest extends BaseFile {
@EndpointInject("mock:result")
@@ -69,8 +64,7 @@ public class FileBridgeErrorHandlerTest extends BaseFile {
onException(Exception.class).handled(true).to("mock:error");
from("file://target/dummy?bridgeErrorHandler=true&autoCreate=false&directoryMustExist=true")
- .log("${body}")
- .to("mock:result");
+ .log("${body}").to("mock:result");
}
};
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
index a5d4ef38ee3..286989406a9 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileBrowsableEndpointTest.java
@@ -33,12 +33,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileBrowsableEndpointTest.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileBrowsableEndpointTest.class })
public class FileBrowsableEndpointTest extends BaseFile {
@Test
@@ -46,8 +41,8 @@ public class FileBrowsableEndpointTest extends BaseFile {
template.sendBodyAndHeader(fileUri(), "B", Exchange.FILE_NAME, "b.txt");
template.sendBodyAndHeader(fileUri(), "A", Exchange.FILE_NAME, "a.txt");
- FileEndpoint endpoint
- = context.getEndpoint(fileUri("?initialDelay=0&delay=10&sortBy=file:name"), FileEndpoint.class);
+ FileEndpoint endpoint = context.getEndpoint(fileUri("?initialDelay=0&delay=10&sortBy=file:name"),
+ FileEndpoint.class);
assertNotNull(endpoint);
MemoryIdempotentRepository repo = (MemoryIdempotentRepository) endpoint.getInProgressRepository();
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileChangedReadLockMarkerFileFalseTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileChangedReadLockMarkerFileFalseTest.java
index c04cecba377..2b8277999e8 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileChangedReadLockMarkerFileFalseTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileChangedReadLockMarkerFileFalseTest.java
@@ -40,13 +40,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@Isolated("Does not play well with parallel unit test execution")
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileChangedReadLockMarkerFileFalseTest.class,
- FileChangedReadLockMarkerFileFalseTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileChangedReadLockMarkerFileFalseTest.class,
+ FileChangedReadLockMarkerFileFalseTest.TestConfiguration.class })
public class FileChangedReadLockMarkerFileFalseTest extends BaseFile {
private static final Logger LOG = LoggerFactory.getLogger(FileChangedReadLockMarkerFileFalseTest.class);
@@ -111,9 +106,9 @@ public class FileChangedReadLockMarkerFileFalseTest extends BaseFile {
return new RouteBuilder() {
@Override
public void configure() {
- from(fileUri("in?initialDelay=0&delay=10&readLock=changed&readLockCheckInterval=100&readLockMarkerFile=false"))
- .to(fileUri("out"),
- "mock:result");
+ from(fileUri(
+ "in?initialDelay=0&delay=10&readLock=changed&readLockCheckInterval=100&readLockMarkerFile=false"))
+ .to(fileUri("out"), "mock:result");
}
};
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
index fbf278b3020..025197f34e6 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerAbsolutePathDefaultMoveTest.java
@@ -33,19 +33,13 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerAbsolutePathDefaultMoveTest.class,
- FileConsumerAbsolutePathDefaultMoveTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerAbsolutePathDefaultMoveTest.class,
+ FileConsumerAbsolutePathDefaultMoveTest.TestConfiguration.class })
public class FileConsumerAbsolutePathDefaultMoveTest extends BaseFile {
@EndpointInject("mock:result")
private MockEndpoint resultEndpoint;
-
@Test
public void testConsumeFromAbsolutePath() throws Exception {
resultEndpoint.expectedBodiesReceived("Hello Paris");
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
index b4ba576d869..a4ccd8b73f1 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerBatchTest.java
@@ -31,16 +31,11 @@ import org.springframework.test.annotation.DirtiesContext;
/**
* Unit test for consuming a batch of files (multiple files in one consume)
*/
-//Based on FileConsumerBatchTest
+// Based on FileConsumerBatchTest
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerBatchTest.class,
- FileConsumerBatchTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerBatchTest.class,
+ FileConsumerBatchTest.TestConfiguration.class })
public class FileConsumerBatchTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
index 698892336eb..f531bd41c01 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileExpressionTest.java
@@ -36,13 +36,8 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerFileExpressionTest.class,
- FileConsumerFileExpressionTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerFileExpressionTest.class,
+ FileConsumerFileExpressionTest.TestConfiguration.class })
public class FileConsumerFileExpressionTest extends BaseFile {
@EndpointInject("mock:result")
@@ -62,8 +57,8 @@ public class FileConsumerFileExpressionTest extends BaseFile {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- from(fileUri("bean"
- + "?initialDelay=0&delay=10&fileName=${bean:counter.next}.txt&delete=true")).to("mock:result");
+ from(fileUri("bean" + "?initialDelay=0&delay=10&fileName=${bean:counter.next}.txt&delete=true"))
+ .to("mock:result");
}
});
@@ -76,10 +71,8 @@ public class FileConsumerFileExpressionTest extends BaseFile {
@Test
public void testConsumeFileBasedOnDatePattern() throws Exception {
- template.sendBodyAndHeader(fileUri("date"), "Bye World", Exchange.FILE_NAME,
- "myfile-20081128.txt");
- template.sendBodyAndHeader(fileUri("date"), "Hello World", Exchange.FILE_NAME,
- "myfile-20081129.txt");
+ template.sendBodyAndHeader(fileUri("date"), "Bye World", Exchange.FILE_NAME, "myfile-20081128.txt");
+ template.sendBodyAndHeader(fileUri("date"), "Hello World", Exchange.FILE_NAME, "myfile-20081129.txt");
template.sendBodyAndHeader(fileUri("date"), "Goodday World", Exchange.FILE_NAME,
context.resolveLanguage("simple").createExpression("myfile-${date:now:yyyyMMdd}.txt"));
@@ -87,9 +80,8 @@ public class FileConsumerFileExpressionTest extends BaseFile {
@Override
public void configure() throws Exception {
// START SNIPPET: e1
- from(fileUri("date"
- + "?initialDelay=0&delay=10&fileName=myfile-${date:now:yyyyMMdd}.txt")).convertBodyTo(String.class)
- .to("mock:result");
+ from(fileUri("date" + "?initialDelay=0&delay=10&fileName=myfile-${date:now:yyyyMMdd}.txt"))
+ .convertBodyTo(String.class).to("mock:result");
// END SNIPPET: e1
}
});
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
index 7d0f07d253b..a0ab653b489 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
@@ -34,13 +34,8 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerFileFilterTest.class,
- FileConsumerFileFilterTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerFileFilterTest.class,
+ FileConsumerFileFilterTest.TestConfiguration.class })
public class FileConsumerFileFilterTest extends BaseFile {
@EndpointInject("mock:result")
@@ -57,9 +52,7 @@ public class FileConsumerFileFilterTest extends BaseFile {
public void testFilterFiles() throws Exception {
resultEndpoint.expectedMessageCount(0);
- template.sendBodyAndHeader(fileUri(), "This is a file to be filtered",
- Exchange.FILE_NAME,
- "skipme.txt");
+ template.sendBodyAndHeader(fileUri(), "This is a file to be filtered", Exchange.FILE_NAME, "skipme.txt");
resultEndpoint.setResultWaitTime(100);
resultEndpoint.assertIsSatisfied();
@@ -69,12 +62,9 @@ public class FileConsumerFileFilterTest extends BaseFile {
public void testFilterFilesWithARegularFile() throws Exception {
resultEndpoint.expectedBodiesReceived("Hello World");
- template.sendBodyAndHeader(fileUri(), "This is a file to be filtered",
- Exchange.FILE_NAME,
- "skipme.txt");
+ template.sendBodyAndHeader(fileUri(), "This is a file to be filtered", Exchange.FILE_NAME, "skipme.txt");
- template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME,
- "hello.txt");
+ template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, "hello.txt");
resultEndpoint.assertIsSatisfied();
}
@@ -93,7 +83,6 @@ public class FileConsumerFileFilterTest extends BaseFile {
}
// END SNIPPET: e1
-
// *************************************
// Config
// *************************************
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
index 6cfaeada941..920a7fc7bb1 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerIdempotentTest.java
@@ -39,13 +39,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerIdempotentTest.class,
- FileConsumerIdempotentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerIdempotentTest.class,
+ FileConsumerIdempotentTest.TestConfiguration.class })
public class FileConsumerIdempotentTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
index 56c6f7c3baf..d96104030f4 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerMoveAndMoveFailureTest.java
@@ -32,13 +32,8 @@ import org.springframework.test.annotation.DirtiesContext;
//Based on FileConsumerMoveAndMoveFailureTest
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerMoveAndMoveFailureTest.class,
- FileConsumerMoveAndMoveFailureTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerMoveAndMoveFailureTest.class,
+ FileConsumerMoveAndMoveFailureTest.TestConfiguration.class })
public class FileConsumerMoveAndMoveFailureTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
index 50bb603fcb3..6e1acb66312 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileConsumerPreMoveTest.java
@@ -1,19 +1,19 @@
package org.apache.camel.component.file;/*
- * 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.
- */
+ * 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.
+ */
import org.apache.camel.EndpointInject;
import org.apache.camel.Exchange;
@@ -36,13 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileConsumerPreMoveTest.class,
- FileConsumerPreMoveTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileConsumerPreMoveTest.class,
+ FileConsumerPreMoveTest.TestConfiguration.class })
public class FileConsumerPreMoveTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadLockWithFileIdempRepoTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadLockWithFileIdempRepoTest.java
index e8f0d1e216d..3dbbba65203 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadLockWithFileIdempRepoTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadLockWithFileIdempRepoTest.java
@@ -43,14 +43,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileIdempotentReadLockWithFileIdempRepoTest.class,
- FileIdempotentReadLockWithFileIdempRepoTest.TestConfiguration.class
- }
-)
-//Based on FileIdempotentReadLockTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileIdempotentReadLockWithFileIdempRepoTest.class,
+ FileIdempotentReadLockWithFileIdempRepoTest.TestConfiguration.class })
+// Based on FileIdempotentReadLockTest
public class FileIdempotentReadLockWithFileIdempRepoTest extends BaseFile {
@EndpointInject("mock:result")
@@ -67,7 +62,7 @@ public class FileIdempotentReadLockWithFileIdempRepoTest extends BaseFile {
myRepo = new FileIdempotentRepository(f, new HashMap<>());
} catch (IOException e) {
- //asserted before the test
+ // asserted before the test
}
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadSameFileAgainTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadSameFileAgainTest.java
index 0146d7c4129..c966c1938f1 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadSameFileAgainTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileIdempotentReadSameFileAgainTest.java
@@ -30,19 +30,14 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileIdempotentReadSameFileAgainTest.class,
- FileIdempotentReadSameFileAgainTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileIdempotentReadSameFileAgainTest.class,
+ FileIdempotentReadSameFileAgainTest.TestConfiguration.class })
public class FileIdempotentReadSameFileAgainTest extends BaseFile {
@EndpointInject("mock:result")
private MockEndpoint resultEndpoint;
private String uri = fileUri("?idempotent=false&move=../done&moveFailed=../error"
- + "&preMove=working/${date:now:yyyyMMddHHmmssSSS}-${file:name}&readLock=none&initialDelay=0&delay=10");
+ + "&preMove=working/${date:now:yyyyMMddHHmmssSSS}-${file:name}&readLock=none&initialDelay=0&delay=10");
@Test
public void testConsumeSameFileAgain() throws Exception {
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java
index 759939c2e3a..bc878665924 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java
@@ -32,13 +32,8 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProduceTempPrefixTest.class,
- FileProduceTempPrefixTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProduceTempPrefixTest.class,
+ FileProduceTempPrefixTest.TestConfiguration.class })
public class FileProduceTempPrefixTest extends BaseFile {
private String fileUrl = fileUri("?tempPrefix=inprogress.");
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java
index 69a513439b6..1bf8010f532 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoISOTest.java
@@ -32,20 +32,14 @@ import java.nio.file.Files;
import static org.junit.jupiter.api.Assertions.assertEquals;
-
/**
*
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerCharsetUTFtoISOTest.class,
- FileProducerCharsetUTFtoISOTest.TestConfiguration.class
- }
-)
-//Based on FileProducerCharsetUTFtoISOTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerCharsetUTFtoISOTest.class,
+ FileProducerCharsetUTFtoISOTest.TestConfiguration.class })
+// Based on FileProducerCharsetUTFtoISOTest
public class FileProducerCharsetUTFtoISOTest extends BaseFile {
private static final String DATA = "ABC\u00e6";
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
index 0256e6b11cb..890954041bc 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerExpressionTest.java
@@ -31,12 +31,7 @@ import java.util.Date;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerExpressionTest.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerExpressionTest.class })
public class FileProducerExpressionTest extends BaseFile {
@Test
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerFileExistOverrideTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerFileExistOverrideTest.java
index 342f2cf5c85..16ba916bd18 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerFileExistOverrideTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerFileExistOverrideTest.java
@@ -30,19 +30,13 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerFileExistOverrideTest.class,
- FileProducerFileExistOverrideTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerFileExistOverrideTest.class,
+ FileProducerFileExistOverrideTest.TestConfiguration.class })
public class FileProducerFileExistOverrideTest extends BaseFile {
@EndpointInject("mock:result")
private MockEndpoint resultEndpoint;
-
@Test
public void testOverride() throws Exception {
resultEndpoint.expectedBodiesReceived("Bye World");
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerOverruleToDifferentFolderTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerOverruleToDifferentFolderTest.java
index b12dafaaf53..5caa981c6bb 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerOverruleToDifferentFolderTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerOverruleToDifferentFolderTest.java
@@ -31,20 +31,14 @@ import java.util.concurrent.TimeUnit;
import static org.awaitility.Awaitility.await;
-
/**
*
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerOverruleToDifferentFolderTest.class,
- FileProducerOverruleToDifferentFolderTest.TestConfiguration.class
- }
-)
-//Based on FileProducerCharsetUTFtoISOTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerOverruleToDifferentFolderTest.class,
+ FileProducerOverruleToDifferentFolderTest.TestConfiguration.class })
+// Based on FileProducerCharsetUTFtoISOTest
public class FileProducerOverruleToDifferentFolderTest extends BaseFile {
@Test
@@ -52,7 +46,8 @@ public class FileProducerOverruleToDifferentFolderTest extends BaseFile {
template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, "in/hello.txt");
template.sendBodyAndHeader(fileUri(), "Bye World", Exchange.FILE_NAME, "in/bye.txt");
- await().atMost(10, TimeUnit.SECONDS).until(() -> Files.exists(testFile("out/copy-of-hello.txt")) && Files.exists(testFile("out/copy-of-bye.txt")));
+ await().atMost(10, TimeUnit.SECONDS).until(
+ () -> Files.exists(testFile("out/copy-of-hello.txt")) && Files.exists(testFile("out/copy-of-bye.txt")));
}
// *************************************
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerRecursivelayToDifferentFolderTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerRecursivelayToDifferentFolderTest.java
index 807c4584483..cb6116676b0 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerRecursivelayToDifferentFolderTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerRecursivelayToDifferentFolderTest.java
@@ -35,20 +35,14 @@ import java.util.concurrent.TimeUnit;
import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.assertEquals;
-
/**
*
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerRecursivelayToDifferentFolderTest.class,
- FileProducerRecursivelayToDifferentFolderTest.TestConfiguration.class
- }
-)
-//Based on FileProducerCharsetUTFtoISOTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerRecursivelayToDifferentFolderTest.class,
+ FileProducerRecursivelayToDifferentFolderTest.TestConfiguration.class })
+// Based on FileProducerCharsetUTFtoISOTest
public class FileProducerRecursivelayToDifferentFolderTest extends BaseFile {
@Test
@@ -56,7 +50,8 @@ public class FileProducerRecursivelayToDifferentFolderTest extends BaseFile {
template.sendBodyAndHeader(fileUri(), "Hello World", Exchange.FILE_NAME, "in/hello.txt");
template.sendBodyAndHeader(fileUri(), "Hello World in subdir", Exchange.FILE_NAME, "in/sub/bye.txt");
- await().atMost(10, TimeUnit.SECONDS).until(() -> Files.exists(testFile("out/hello.txt")) && Files.exists(testFile("out/sub/bye.txt")));
+ await().atMost(10, TimeUnit.SECONDS)
+ .until(() -> Files.exists(testFile("out/hello.txt")) && Files.exists(testFile("out/sub/bye.txt")));
}
// *************************************
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerStreamTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerStreamTest.java
index 8692cce387a..29e10bbe39d 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerStreamTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileProducerStreamTest.java
@@ -32,13 +32,8 @@ import java.util.stream.Stream;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileProducerStreamTest.class,
- FileProducerStreamTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileProducerStreamTest.class,
+ FileProducerStreamTest.TestConfiguration.class })
public class FileProducerStreamTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
index d20f6860246..0b43e7d43b3 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
@@ -35,13 +35,8 @@ import java.util.Comparator;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileSorterRefTest.class,
- FileSorterRefTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileSorterRefTest.class,
+ FileSorterRefTest.TestConfiguration.class })
public class FileSorterRefTest extends BaseFile {
@EndpointInject("mock:result")
@@ -58,7 +53,8 @@ public class FileSorterRefTest extends BaseFile {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
- from(fileUri("?initialDelay=0&delay=10&sorter=#mySorter")).convertBodyTo(String.class).to("mock:result");
+ from(fileUri("?initialDelay=0&delay=10&sorter=#mySorter")).convertBodyTo(String.class)
+ .to("mock:result");
}
});
@@ -92,9 +88,9 @@ public class FileSorterRefTest extends BaseFile {
return new RouteBuilder() {
@Override
public void configure() {
- from(fileUri("in?initialDelay=0&delay=10&readLock=changed&readLockCheckInterval=100&readLockMarkerFile=false"))
- .to(fileUri("out"),
- "mock:result");
+ from(fileUri(
+ "in?initialDelay=0&delay=10&readLock=changed&readLockCheckInterval=100&readLockMarkerFile=false"))
+ .to(fileUri("out"), "mock:result");
}
};
}
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileToFileWithFlattenTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileToFileWithFlattenTest.java
index 700fd18a104..4ce5bcd9dff 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileToFileWithFlattenTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FileToFileWithFlattenTest.java
@@ -30,12 +30,7 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileToFileWithFlattenTest.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileToFileWithFlattenTest.class })
public class FileToFileWithFlattenTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java
index 1337bfa0753..29b99b6d828 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNamePrefixTest.java
@@ -34,13 +34,8 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FilerConsumerDoneFileNamePrefixTest.class,
- FilerConsumerDoneFileNamePrefixTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FilerConsumerDoneFileNamePrefixTest.class,
+ FilerConsumerDoneFileNamePrefixTest.TestConfiguration.class })
public class FilerConsumerDoneFileNamePrefixTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
index ba62f1b7501..c03347decad 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FilerProducerDoneFileNameRouteTest.java
@@ -39,13 +39,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
*/
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FilerProducerDoneFileNameRouteTest.class,
- FilerProducerDoneFileNameRouteTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FilerProducerDoneFileNameRouteTest.class,
+ FilerProducerDoneFileNameRouteTest.TestConfiguration.class })
public class FilerProducerDoneFileNameRouteTest extends BaseFile {
@EndpointInject("mock:result")
diff --git a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FromFileMoveFileIfProcessFailsTest.java b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FromFileMoveFileIfProcessFailsTest.java
index 212b56d9b18..b2279b248e1 100644
--- a/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FromFileMoveFileIfProcessFailsTest.java
+++ b/components-starter/camel-file-starter/src/test/java/org/apache/camel/component/file/FromFileMoveFileIfProcessFailsTest.java
@@ -33,13 +33,8 @@ import java.util.Properties;
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FromFileMoveFileIfProcessFailsTest.class,
- FromFileMoveFileIfProcessFailsTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FromFileMoveFileIfProcessFailsTest.class,
+ FromFileMoveFileIfProcessFailsTest.TestConfiguration.class })
public class FromFileMoveFileIfProcessFailsTest extends BaseFile {
@EndpointInject("mock:foo")
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/AbstractBaseFtp.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/AbstractBaseFtp.java
index 294c349aab2..ad64480051c 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/AbstractBaseFtp.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/AbstractBaseFtp.java
@@ -65,10 +65,10 @@ public abstract class AbstractBaseFtp {
protected static void assertFileExists(Path file, String content) throws IOException {
Assertions.assertTrue(Files.exists(file, new LinkOption[0]), "File " + file + " should exist");
Assertions.assertTrue(Files.isRegularFile(file, new LinkOption[0]), "File " + file + " should be a file");
- Assertions.assertEquals(content, new String(Files.readAllBytes(file)), "File " + file + " has unexpected content");
+ Assertions.assertEquals(content, new String(Files.readAllBytes(file)),
+ "File " + file + " has unexpected content");
}
-
protected Path testFile(String dir) {
return this.testDirectory().resolve(dir);
}
@@ -100,7 +100,6 @@ public abstract class AbstractBaseFtp {
return "file:" + var10000 + (query.startsWith("?") ? "" : "/") + query;
}
-
// *************************************
// Config
// *************************************
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/BaseFtp.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/BaseFtp.java
index 951e2b68883..7b495172f85 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/BaseFtp.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/BaseFtp.java
@@ -21,7 +21,6 @@ import org.junit.jupiter.api.extension.RegisterExtension;
import java.nio.file.Path;
-
public class BaseFtp extends AbstractBaseFtp {
protected static final String AUTH_VALUE_SSL = "SSLv3";
protected static final String AUTH_VALUE_TLS = "TLSv1.3";
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpFilterTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpFilterTest.java
index a8d3be23373..e2f71260b06 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpFilterTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpFilterTest.java
@@ -31,14 +31,9 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FromFtpFilterTest.class,
- FromFtpFilterTest.TestConfiguration.class
- }
-)
-//Based on FromFtpFilterIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FromFtpFilterTest.class,
+ FromFtpFilterTest.TestConfiguration.class })
+// Based on FromFtpFilterIT
public class FromFtpFilterTest extends BaseFtp {
@EndpointInject("mock:result")
@@ -75,7 +70,7 @@ public class FromFtpFilterTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpMoveFileRecursiveTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpMoveFileRecursiveTest.java
index b1da84bb63e..5aa47ee0f53 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpMoveFileRecursiveTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpMoveFileRecursiveTest.java
@@ -31,13 +31,8 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FromFtpMoveFileRecursiveTest.class,
- FromFtpMoveFileRecursiveTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FromFtpMoveFileRecursiveTest.class,
+ FromFtpMoveFileRecursiveTest.TestConfiguration.class })
// Based on FromFtpMoveFileRecursiveIT
public class FromFtpMoveFileRecursiveTest extends BaseFtp {
@@ -46,7 +41,7 @@ public class FromFtpMoveFileRecursiveTest extends BaseFtp {
protected String getFtpUrl() {
return "ftp://admin@localhost:" + getPort() + "/movefile?password=admin&recursive=true&binary=false"
- + "&move=.done/${file:name}.old&initialDelay=2500&delay=5000";
+ + "&move=.done/${file:name}.old&initialDelay=2500&delay=5000";
}
@BeforeEach
@@ -75,7 +70,7 @@ public class FromFtpMoveFileRecursiveTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpToBinaryFileTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpToBinaryFileTest.java
index 2a2ff451978..7dd1d1b5416 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpToBinaryFileTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FromFtpToBinaryFileTest.java
@@ -37,14 +37,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FromFtpToBinaryFileTest.class,
- FromFtpToBinaryFileTest.TestConfiguration.class
- }
-)
-//Baaed on FromFtpToBinaryFileIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FromFtpToBinaryFileTest.class,
+ FromFtpToBinaryFileTest.TestConfiguration.class })
+// Baaed on FromFtpToBinaryFileIT
public class FromFtpToBinaryFileTest extends BaseFtp {
@EndpointInject("mock:result")
@@ -53,16 +48,14 @@ public class FromFtpToBinaryFileTest extends BaseFtp {
// must user "consumer." prefix on the parameters to the file component
private String getFtpUrl() {
return "ftp://admin@localhost:" + getPort() + "/tmp4/camel?password=admin&binary=true"
- + "&delay=5000&recursive=false";
+ + "&delay=5000&recursive=false";
}
-
@BeforeEach
public void setUp() throws Exception {
prepareFtpServer();
}
-
@Test
public void testFtpRoute() throws Exception {
resultEndpoint.expectedMessageCount(1);
@@ -96,7 +89,7 @@ public class FromFtpToBinaryFileTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
@@ -104,7 +97,8 @@ public class FromFtpToBinaryFileTest extends BaseFtp {
@Override
public void configure() {
String fileUrl = fileUri("?noop=true&fileExist=Override");
- from(getFtpUrl()).setHeader(Exchange.FILE_NAME, constant("deleteme.jpg")).to(fileUrl, "mock:result");
+ from(getFtpUrl()).setHeader(Exchange.FILE_NAME, constant("deleteme.jpg")).to(fileUrl,
+ "mock:result");
}
};
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpAnonymousTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpAnonymousTest.java
index eb7f5d52024..897c261510b 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpAnonymousTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpAnonymousTest.java
@@ -33,14 +33,9 @@ import org.springframework.test.annotation.DirtiesContext;
*/
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpAnonymousTest.class,
- FtpAnonymousTest.TestConfiguration.class
- }
-)
-//Based on FtpAnonymousIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpAnonymousTest.class,
+ FtpAnonymousTest.TestConfiguration.class })
+// Based on FtpAnonymousIT
public class FtpAnonymousTest extends BaseFtp {
@EndpointInject("mock:result")
@@ -67,7 +62,7 @@ public class FtpAnonymousTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpConsumerMaxMessagesPerPollTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpConsumerMaxMessagesPerPollTest.java
index 64ba3d36b28..e4b674af279 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpConsumerMaxMessagesPerPollTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpConsumerMaxMessagesPerPollTest.java
@@ -31,21 +31,17 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpConsumerMaxMessagesPerPollTest.class,
- FtpConsumerMaxMessagesPerPollTest.TestConfiguration.class
- }
-)
-//Based on FtpConsumerMaxMessagesPerPollIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpConsumerMaxMessagesPerPollTest.class,
+ FtpConsumerMaxMessagesPerPollTest.TestConfiguration.class })
+// Based on FtpConsumerMaxMessagesPerPollIT
public class FtpConsumerMaxMessagesPerPollTest extends BaseFtp {
@EndpointInject("mock:result")
private MockEndpoint mock;
private String getFtpUrl() {
- return "ftp://admin@localhost:" + getPort() + "/poll/?password=admin&delay=6000&delete=true&sortBy=file:name&maxMessagesPerPoll=2";
+ return "ftp://admin@localhost:" + getPort()
+ + "/poll/?password=admin&delay=6000&delete=true&sortBy=file:name&maxMessagesPerPoll=2";
}
@BeforeEach
@@ -78,7 +74,7 @@ public class FtpConsumerMaxMessagesPerPollTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpEmbeddedService.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpEmbeddedService.java
index d4650956556..7685c428fba 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpEmbeddedService.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpEmbeddedService.java
@@ -73,8 +73,7 @@ public class FtpEmbeddedService extends AbstractTestService implements FtpServic
ftpServer = factory.createServer();
ftpServer.start();
- port = ((DefaultFtpServer) ftpServer).getListeners().values().stream()
- .map(Listener::getPort).findAny().get();
+ port = ((DefaultFtpServer) ftpServer).getListeners().values().stream().map(Listener::getPort).findAny().get();
}
private Path testDirectory() {
@@ -153,9 +152,9 @@ public class FtpEmbeddedService extends AbstractTestService implements FtpServic
ftpServer = null;
}
- // if (port != null) {
- // port.release();
- // }
+ // if (port != null) {
+ // port.release();
+ // }
}
public void disconnectAllSessions() {
@@ -186,8 +185,7 @@ public class FtpEmbeddedService extends AbstractTestService implements FtpServic
public void resume() {
ftpServer.resume();
- port = ((DefaultFtpServer) ftpServer).getListeners().values().stream()
- .map(Listener::getPort).findAny().get();
+ port = ((DefaultFtpServer) ftpServer).getListeners().values().stream().map(Listener::getPort).findAny().get();
}
public int getPort() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpProducerConcurrentTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpProducerConcurrentTest.java
index f35d8a20443..0dee5c692ba 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpProducerConcurrentTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpProducerConcurrentTest.java
@@ -31,14 +31,9 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpProducerConcurrentTest.class,
- FtpProducerConcurrentTest.TestConfiguration.class
- }
-)
-//Based on FtpProducerConcurrentIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpProducerConcurrentTest.class,
+ FtpProducerConcurrentTest.TestConfiguration.class })
+// Based on FtpProducerConcurrentIT
public class FtpProducerConcurrentTest extends BaseFtp {
@EndpointInject("mock:result")
@@ -79,13 +74,12 @@ public class FtpProducerConcurrentTest extends BaseFtp {
executor.shutdownNow();
}
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseFalseTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseFalseTest.java
index 0bfda862a42..f7d576f66ae 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseFalseTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseFalseTest.java
@@ -36,13 +36,8 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpSimpleConsumeStreamingStepwiseFalseTest.class,
- FtpSimpleConsumeStreamingStepwiseFalseTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpSimpleConsumeStreamingStepwiseFalseTest.class,
+ FtpSimpleConsumeStreamingStepwiseFalseTest.TestConfiguration.class })
public class FtpSimpleConsumeStreamingStepwiseFalseTest extends BaseFtp {
@EndpointInject("mock:result")
@@ -80,17 +75,16 @@ public class FtpSimpleConsumeStreamingStepwiseFalseTest extends BaseFtp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
return new RouteBuilder() {
@Override
public void configure() {
- from("ftp://localhost:" + getPort()
+ from("ftp://localhost:" + getPort()
+ "/tmp/mytemp?username=admin&password=admin&delay=10000&disconnect=true&streamDownload=true&stepwise="
- + isStepwise())
- .to("mock:result");
+ + isStepwise()).to("mock:result");
}
};
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseTrueTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseTrueTest.java
index 377a48a66de..205ae0a57d7 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseTrueTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSimpleConsumeStreamingStepwiseTrueTest.java
@@ -25,13 +25,8 @@ import org.springframework.test.annotation.DirtiesContext;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpSimpleConsumeStreamingStepwiseTrueTest.class,
- FtpSimpleConsumeStreamingStepwiseTrueTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpSimpleConsumeStreamingStepwiseTrueTest.class,
+ FtpSimpleConsumeStreamingStepwiseTrueTest.TestConfiguration.class })
public class FtpSimpleConsumeStreamingStepwiseTrueTest extends FtpSimpleConsumeStreamingStepwiseFalseTest {
@Override
@@ -53,6 +48,6 @@ public class FtpSimpleConsumeStreamingStepwiseTrueTest extends FtpSimpleConsumeS
// *************************************
@Configuration
- public class TestConfiguration extends FtpSimpleConsumeStreamingStepwiseFalseTest.TestConfiguration {
+ public class TestConfiguration extends FtpSimpleConsumeStreamingStepwiseFalseTest.TestConfiguration {
}
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSoTimeoutTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSoTimeoutTest.java
index 64e8337bff4..511a733aa4f 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSoTimeoutTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftp/FtpSoTimeoutTest.java
@@ -40,14 +40,9 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpSoTimeoutTest.class,
- FtpSoTimeoutTest.TestConfiguration.class
- }
-)
-//Based on FtpSoTimeoutTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpSoTimeoutTest.class,
+ FtpSoTimeoutTest.TestConfiguration.class })
+// Based on FtpSoTimeoutTest
public class FtpSoTimeoutTest {
@Autowired
@@ -88,12 +83,13 @@ public class FtpSoTimeoutTest {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public ServerSocket createServerSocket() throws IOException {
return new ServerSocket(0);
}
+
@Bean
public RouteBuilder routeBuilder(ServerSocket serverSocket) {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsClientAuth.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsClientAuth.java
index 6dc3e2aa89a..ca4180c2fd4 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsClientAuth.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsClientAuth.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.file.remote.springboot.ftps;
import org.apache.camel.component.file.remote.springboot.AbstractBaseFtp;
import org.junit.jupiter.api.extension.RegisterExtension;
-
public class BaseFtpsClientAuth extends AbstractBaseFtp {
protected static final String AUTH_VALUE_SSL = "SSLv3";
protected static final String AUTH_VALUE_TLS = "TLSv1.3";
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsImplicitClientAuth.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsImplicitClientAuth.java
index 1b4448e327b..716370fd0c7 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsImplicitClientAuth.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/BaseFtpsImplicitClientAuth.java
@@ -19,7 +19,6 @@ package org.apache.camel.component.file.remote.springboot.ftps;
import org.apache.camel.component.file.remote.springboot.AbstractBaseFtp;
import org.junit.jupiter.api.extension.RegisterExtension;
-
public class BaseFtpsImplicitClientAuth extends AbstractBaseFtp {
protected static final String AUTH_VALUE_SSL = "SSLv3";
protected static final String AUTH_VALUE_TLS = "TLSv1.3";
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java
index ecc32628a20..9b6dde9e22a 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsImplicitSSLWithClientAuthTest.java
@@ -30,13 +30,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileToFtpsImplicitSSLWithClientAuthTest.class
- }
-)
-//Based on FileToFtpsImplicitSSLWithClientAuthIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileToFtpsImplicitSSLWithClientAuthTest.class })
+// Based on FileToFtpsImplicitSSLWithClientAuthIT
public class FileToFtpsImplicitSSLWithClientAuthTest extends BaseFtpsImplicitClientAuth {
@EndpointInject("mock:result")
@@ -44,9 +39,9 @@ public class FileToFtpsImplicitSSLWithClientAuthTest extends BaseFtpsImplicitCli
protected String getFtpUrl() {
return "ftps://admin@localhost:" + getPort()
- + "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
- + "&securityProtocol=TLSv1.3&implicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
- + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
+ + "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ + "&securityProtocol=TLSv1.3&implicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password&delete=true";
}
@Test
@@ -67,7 +62,7 @@ public class FileToFtpsImplicitSSLWithClientAuthTest extends BaseFtpsImplicitCli
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java
index 2abfb4d7322..e2400ea7e2c 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FileToFtpsWithCustomTrustStorePropertiesTest.java
@@ -30,13 +30,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FileToFtpsWithCustomTrustStorePropertiesTest.class
- }
-)
-//based on FileToFtpsWithCustomTrustStorePropertiesIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FileToFtpsWithCustomTrustStorePropertiesTest.class })
+// based on FileToFtpsWithCustomTrustStorePropertiesIT
public class FileToFtpsWithCustomTrustStorePropertiesTest extends BaseFtpsClientAuth {
@EndpointInject("mock:result")
@@ -44,9 +39,9 @@ public class FileToFtpsWithCustomTrustStorePropertiesTest extends BaseFtpsClient
private String getFtpUrl() {
return "ftps://admin@localhost:" + getPort()
- + "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
- + "&securityProtocol=TLSv1.3&implicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=PKCS12"
- + "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password&delete=true";
+ + "/tmp2/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ + "&securityProtocol=TLSv1.3&implicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=PKCS12"
+ + "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password&delete=true";
}
@@ -68,7 +63,7 @@ public class FileToFtpsWithCustomTrustStorePropertiesTest extends BaseFtpsClient
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsEmbeddedService.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsEmbeddedService.java
index 46610e290a4..4a8c0f3ea6b 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsEmbeddedService.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsEmbeddedService.java
@@ -62,7 +62,7 @@ public class FtpsEmbeddedService extends FtpEmbeddedService {
protected SslConfigurationFactory createSslConfiguration() {
// comment in, if you have trouble with SSL
- System.setProperty("javax.net.debug", "all");
+ System.setProperty("javax.net.debug", "all");
SslConfigurationFactory sslConfigFactory = new SslConfigurationFactory();
sslConfigFactory.setSslProtocol(authValue);
@@ -94,7 +94,8 @@ public class FtpsEmbeddedService extends FtpEmbeddedService {
String name = System.getProperty("os.name");
String message = e.getMessage();
- LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message, e);
+ LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message,
+ e);
return false;
}
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsImplicitEmbeddedService.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsImplicitEmbeddedService.java
index a3f352396f1..b44c3548527 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsImplicitEmbeddedService.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsImplicitEmbeddedService.java
@@ -94,7 +94,8 @@ public class FtpsImplicitEmbeddedService extends FtpEmbeddedService {
String name = System.getProperty("os.name");
String message = e.getMessage();
- LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message, e);
+ LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message,
+ e);
return false;
}
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java
index 173c23a9a09..9aeb7f10e94 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/ftps/FtpsTest.java
@@ -30,13 +30,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- FtpsTest.class
- }
-)
-//based on FileToFtpsWithCustomTrustStorePropertiesIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, FtpsTest.class })
+// based on FileToFtpsWithCustomTrustStorePropertiesIT
public class FtpsTest extends BaseFtpsClientAuth {
@EndpointInject("mock:result")
@@ -44,8 +39,8 @@ public class FtpsTest extends BaseFtpsClientAuth {
private String getFtpUrl() {
return "ftps://admin@localhost:" + getPort()
- + "/tmp1/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
- + "&securityProtocol=TLSv1.3&implicit=false";
+ + "/tmp1/camel?password=admin&initialDelay=2000&disableSecureDataChannelDefaults=true"
+ + "&securityProtocol=TLSv1.3&implicit=false";
}
@@ -67,7 +62,7 @@ public class FtpsTest extends BaseFtpsClientAuth {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/BaseSftp.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/BaseSftp.java
index 2eacd4c458f..9180e59c926 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/BaseSftp.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/BaseSftp.java
@@ -22,7 +22,6 @@ import org.junit.jupiter.api.extension.RegisterExtension;
import java.nio.file.Path;
-
public class BaseSftp extends AbstractBaseFtp {
@RegisterExtension
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java
index c9bc25e0ec9..4c301d50c4e 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpConsumerLocalWorkDirectoryTest.java
@@ -41,22 +41,16 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SftpConsumerLocalWorkDirectoryTest.class
- }
-)
-//Based on SftpConsumerLocalWorkDirectoryIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SftpConsumerLocalWorkDirectoryTest.class })
+// Based on SftpConsumerLocalWorkDirectoryIT
public class SftpConsumerLocalWorkDirectoryTest extends BaseSftp {
@EndpointInject("mock:result")
private MockEndpoint mock;
protected String getFtpUrl() {
- return "sftp://localhost:" + getPort() + "/" + getRootDir() + "/?password=admin"
- + "&localWorkDirectory=" + ftpFile("lwd")
- + "&noop=true";
+ return "sftp://localhost:" + getPort() + "/" + getRootDir() + "/?password=admin" + "&localWorkDirectory="
+ + ftpFile("lwd") + "&noop=true";
}
@BeforeEach
@@ -108,7 +102,7 @@ public class SftpConsumerLocalWorkDirectoryTest extends BaseSftp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpEmbeddedService.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpEmbeddedService.java
index 25c28a6e06d..ca62cd37d33 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpEmbeddedService.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpEmbeddedService.java
@@ -46,8 +46,8 @@ import java.util.function.BiConsumer;
public class SftpEmbeddedService extends AbstractTestService implements FtpService {
private static final Logger LOG = LoggerFactory.getLogger(SftpEmbeddedService.class);
private static final String KNOWN_HOSTS = "[localhost]:%d ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDdfIWeSV4o68dRrKS"
- + "zFd/Bk51E65UTmmSrmW0O1ohtzi6HzsDPjXgCtlTt3FqTcfFfI92IlTr4JWqC9UK1QT1ZTeng0MkPQmv68hDANHbt5CpETZHjW5q4OOgWhV"
- + "vj5IyOC2NZHtKlJBkdsMAa15ouOOJLzBvAvbqOR/yUROsEiQ==";
+ + "zFd/Bk51E65UTmmSrmW0O1ohtzi6HzsDPjXgCtlTt3FqTcfFfI92IlTr4JWqC9UK1QT1ZTeng0MkPQmv68hDANHbt5CpETZHjW5q4OOgWhV"
+ + "vj5IyOC2NZHtKlJBkdsMAa15ouOOJLzBvAvbqOR/yUROsEiQ==";
protected SshServer sshd;
protected final boolean rootDirMode;
@@ -169,7 +169,8 @@ public class SftpEmbeddedService extends AbstractTestService implements FtpServi
String name = System.getProperty("os.name");
String message = e.getMessage();
- LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message, e);
+ LOG.warn("SunX509 is not available on this platform [{}] Testing is skipped! Real cause: {}", name, message,
+ e);
return false;
}
}
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java
index 125f3e05d9e..e2e51b33ba5 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpKeyExchangeProtocolsTest.java
@@ -44,13 +44,8 @@ import java.util.List;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SftpKeyExchangeProtocolsTest.class
- }
-)
-//Based on SftpKeyExchangeProtocolsIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SftpKeyExchangeProtocolsTest.class })
+// Based on SftpKeyExchangeProtocolsIT
@Isolated
public class SftpKeyExchangeProtocolsTest extends BaseSftp {
@@ -72,18 +67,16 @@ public class SftpKeyExchangeProtocolsTest extends BaseSftp {
protected String getFtpUrl() {
return "sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "/keyExchangeProtocols/?password=admin"
- + "&noop=true";
+ + "&noop=true";
}
@Test
public void testNonExistingKey() {
Throwable exception = Assertions.assertThrows(CamelExecutionException.class,
- () -> template
- .sendBodyAndHeader("sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "}/keyExchangeProtocols?" +
- "password=admin" +
- "&keyExchangeProtocols=nonExistingKeyExchange",
- "a", Exchange.FILE_NAME,
- "a.txt"));
+ () -> template.sendBodyAndHeader(
+ "sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "}/keyExchangeProtocols?"
+ + "password=admin" + "&keyExchangeProtocols=nonExistingKeyExchange",
+ "a", Exchange.FILE_NAME, "a.txt"));
final List<String> errorMessages = new ArrayList<>();
while (exception.getCause() != null) {
@@ -98,11 +91,8 @@ public class SftpKeyExchangeProtocolsTest extends BaseSftp {
public void testSingleKey() throws Exception {
result.expectedMessageCount(1);
- template.sendBodyAndHeader("sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "/keyExchangeProtocols" +
- "?password=admin" +
- "&keyExchangeProtocols=ecdh-sha2-nistp384",
- "a", Exchange.FILE_NAME,
- "a.txt");
+ template.sendBodyAndHeader("sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "/keyExchangeProtocols"
+ + "?password=admin" + "&keyExchangeProtocols=ecdh-sha2-nistp384", "a", Exchange.FILE_NAME, "a.txt");
result.assertIsSatisfied();
}
@@ -111,11 +101,10 @@ public class SftpKeyExchangeProtocolsTest extends BaseSftp {
public void testMultipleKey() throws Exception {
result.expectedMessageCount(1);
- template.sendBodyAndHeader("sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "/keyExchangeProtocols" +
- "?password=admin" +
- "&keyExchangeProtocols=ecdh-sha2-nistp384,diffie-hellman-group-exchange-sha256,nonExistingKey",
- "a", Exchange.FILE_NAME,
- "a.txt");
+ template.sendBodyAndHeader("sftp://admin@localhost:" + getPort() + "/" + getRootDir() + "/keyExchangeProtocols"
+ + "?password=admin"
+ + "&keyExchangeProtocols=ecdh-sha2-nistp384,diffie-hellman-group-exchange-sha256,nonExistingKey", "a",
+ Exchange.FILE_NAME, "a.txt");
result.assertIsSatisfied();
}
@@ -130,7 +119,7 @@ public class SftpKeyExchangeProtocolsTest extends BaseSftp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSetOperationsTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSetOperationsTest.java
index 52cb86a5449..13afff93724 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSetOperationsTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSetOperationsTest.java
@@ -28,20 +28,15 @@ import java.io.File;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SftpSetOperationsTest.class
- }
-)
-//Based on SftpSetOperationsTest
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SftpSetOperationsTest.class })
+// Based on SftpSetOperationsTest
public class SftpSetOperationsTest extends BaseSftp {
@Test
public void testSftpSetOperations() {
String preferredAuthentications = "password,publickey";
String uri = "sftp://localhost:" + getPort() + "/" + getRootDir()
- + "?username=admin&password=admin&ciphers=aes256-ctr" + "&preferredAuthentications=password,publickey";
+ + "?username=admin&password=admin&ciphers=aes256-ctr" + "&preferredAuthentications=password,publickey";
template.sendBodyAndHeader(uri, "Hello World", Exchange.FILE_NAME, "hello.txt");
// test setting the cipher doesn't interfere with message payload
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSimpleProduceThroughProxyTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSimpleProduceThroughProxyTest.java
index 1bb356978a9..013f8256ee4 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSimpleProduceThroughProxyTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpSimpleProduceThroughProxyTest.java
@@ -41,14 +41,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SftpSimpleProduceThroughProxyTest.class,
- SftpSimpleProduceThroughProxyTest.TestConfiguration.class
- }
-)
-//Based on SftpSimpleProduceThroughProxyIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SftpSimpleProduceThroughProxyTest.class,
+ SftpSimpleProduceThroughProxyTest.TestConfiguration.class })
+// Based on SftpSimpleProduceThroughProxyIT
public class SftpSimpleProduceThroughProxyTest extends BaseSftp {
private static HttpProxyServer proxyServer;
@@ -56,8 +51,7 @@ public class SftpSimpleProduceThroughProxyTest extends BaseSftp {
@BeforeAll
public static void setupProxy() {
- proxyServer = DefaultHttpProxyServer.bootstrap()
- .withPort(proxyPort)
+ proxyServer = DefaultHttpProxyServer.bootstrap().withPort(proxyPort)
.withProxyAuthenticator(new ProxyAuthenticator() {
@Override
public boolean authenticate(String userName, String password) {
@@ -79,10 +73,8 @@ public class SftpSimpleProduceThroughProxyTest extends BaseSftp {
@Test
public void testSftpSimpleProduceThroughProxy() {
template.sendBodyAndHeader(
- "sftp://localhost:" + getPort() + "/" + getRootDir()
- + "?username=admin&password=admin&proxy=#proxy",
- "Hello World", Exchange.FILE_NAME,
- "hello.txt");
+ "sftp://localhost:" + getPort() + "/" + getRootDir() + "?username=admin&password=admin&proxy=#proxy",
+ "Hello World", Exchange.FILE_NAME, "hello.txt");
File file = ftpFile("hello.txt").toFile();
assertTrue(file.exists(), "File should exist: " + file);
@@ -93,9 +85,8 @@ public class SftpSimpleProduceThroughProxyTest extends BaseSftp {
public void testSftpSimpleSubPathProduceThroughProxy() {
template.sendBodyAndHeader(
"sftp://localhost:" + getPort() + "/" + getRootDir()
- + "/mysub?username=admin&password=admin&proxy=#proxy",
- "Bye World", Exchange.FILE_NAME,
- "bye.txt");
+ + "/mysub?username=admin&password=admin&proxy=#proxy",
+ "Bye World", Exchange.FILE_NAME, "bye.txt");
File file = ftpFile("mysub/bye.txt").toFile();
assertTrue(file.exists(), "File should exist: " + file);
@@ -104,25 +95,22 @@ public class SftpSimpleProduceThroughProxyTest extends BaseSftp {
@Test
public void testSftpSimpleTwoSubPathProduceThroughProxy() {
- template.sendBodyAndHeader("sftp://localhost:" + getPort() + "/" + getRootDir()
- + "/mysub/myother?username=admin&password=admin&proxy=#proxy",
- "Farewell World",
- Exchange.FILE_NAME, "farewell.txt");
+ template.sendBodyAndHeader(
+ "sftp://localhost:" + getPort() + "/" + getRootDir()
+ + "/mysub/myother?username=admin&password=admin&proxy=#proxy",
+ "Farewell World", Exchange.FILE_NAME, "farewell.txt");
File file = ftpFile("mysub/myother/farewell.txt").toFile();
assertTrue(file.exists(), "File should exist: " + file);
assertEquals("Farewell World", context.getTypeConverter().convertTo(String.class, file));
}
-
-
-
// *************************************
// Config
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
diff --git a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java
index ba91b07b8b7..e05ae9c89f4 100644
--- a/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java
+++ b/components-starter/camel-ftp-starter/src/test/java/org/apache/camel/component/file/remote/springboot/sftp/SftpUseListFalseTest.java
@@ -40,13 +40,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SftpUseListFalseTest.class
- }
-)
-//Based on SftpUseListFalseIT
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SftpUseListFalseTest.class })
+// Based on SftpUseListFalseIT
public class SftpUseListFalseTest extends BaseSftp {
@EndpointInject("mock:result")
@@ -78,7 +73,7 @@ public class SftpUseListFalseTest extends BaseSftp {
// *************************************
@Configuration
- public class TestConfiguration extends BaseFtp.TestConfiguration {
+ public class TestConfiguration extends BaseFtp.TestConfiguration {
@Bean
public RouteBuilder routeBuilder() {
@@ -87,8 +82,7 @@ public class SftpUseListFalseTest extends BaseSftp {
public void configure() {
from("sftp://localhost:" + getPort() + "/" + getRootDir()
+ "?username=admin&password=admin&delay=10000&disconnect=true&stepwise=false&useList=false&fileName=report.txt&delete=true")
- .routeId("foo").noAutoStartup()
- .to("mock:result");
+ .routeId("foo").noAutoStartup().to("mock:result");
}
};
}
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonConcurrentTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonConcurrentTest.java
index 5c333e7812b..534a21e4c69 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonConcurrentTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonConcurrentTest.java
@@ -36,26 +36,18 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonConcurrentTest.class,
- GsonConcurrentTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonConcurrentTest.class,
+ GsonConcurrentTest.TestConfiguration.class })
public class GsonConcurrentTest {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:result")
MockEndpoint mock;
-
@Test
public void testNoConcurrentProducers() throws Exception {
doSendMessages(1, 1);
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonFieldNamePolicyTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonFieldNamePolicyTest.java
index 4d031399f0b..5e80c7d3619 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonFieldNamePolicyTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonFieldNamePolicyTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
-
import com.google.gson.FieldNamingPolicy;
import org.apache.camel.ProducerTemplate;
@@ -37,24 +35,15 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonFieldNamePolicyTest.class,
- GsonFieldNamePolicyTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonFieldNamePolicyTest.class,
+ GsonFieldNamePolicyTest.TestConfiguration.class })
public class GsonFieldNamePolicyTest {
-
@Autowired
ProducerTemplate template;
-
-
@Test
public void testUnmarshalPojo() {
String json = "{\"id\":\"123\",\"first_name\":\"Donald\",\"last_name\":\"Duck\"}";
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonJsonDataFormatTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonJsonDataFormatTest.java
index 2d3297bc8ec..44c52790894 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonJsonDataFormatTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonJsonDataFormatTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import java.util.Map;
import org.apache.camel.EndpointInject;
@@ -36,26 +35,18 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonJsonDataFormatTest.class,
- GsonJsonDataFormatTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonJsonDataFormatTest.class,
+ GsonJsonDataFormatTest.TestConfiguration.class })
public class GsonJsonDataFormatTest {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reversePojo")
MockEndpoint mock;
-
@Test
public void testUnmarshalMap() {
Map<?, ?> unmarshalled = template.requestBody("direct:json",
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
index a7d3f65226a..d6313844a1b 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalExclusionTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import java.util.Arrays;
import com.google.gson.ExclusionStrategy;
@@ -41,37 +40,29 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonMarshalExclusionTest.class,
- GsonMarshalExclusionTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonMarshalExclusionTest.class,
+ GsonMarshalExclusionTest.TestConfiguration.class })
public class GsonMarshalExclusionTest {
@Autowired
CamelContext context;
-
+
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reversePojoExcludeWeight")
MockEndpoint mockWeight;
-
+
@EndpointInject("mock:reversePojoExcludeAge")
MockEndpoint mockAge;
-
@Test
public void testMarshalAndUnmarshalPojoWithExclusion() throws Exception {
TestPojoExclusion in = new TestPojoExclusion();
-
mockWeight.expectedMessageCount(1);
mockWeight.message(0).body().isInstanceOf(TestPojoExclusion.class);
mockWeight.message(0).body().isEqualTo(in);
@@ -86,7 +77,7 @@ public class GsonMarshalExclusionTest {
mockWeight.assertIsSatisfied();
}
-
+
@Test
public void testMarshalAndUnmarshalPojoWithAnotherExclusion() throws Exception {
@@ -106,7 +97,7 @@ public class GsonMarshalExclusionTest {
mockAge.assertIsSatisfied();
}
-
+
/**
* Strategy to exclude {@link ExcludeWeight} annotated fields
*/
@@ -123,7 +114,7 @@ public class GsonMarshalExclusionTest {
}
}
- //START SNIPPET: strategy
+ // START SNIPPET: strategy
/**
* Strategy to exclude {@link ExcludeAge} annotated fields
*/
@@ -139,7 +130,7 @@ public class GsonMarshalExclusionTest {
return false;
}
}
- //END SNIPPET: strategy
+ // END SNIPPET: strategy
// *************************************
// Config
@@ -155,15 +146,18 @@ public class GsonMarshalExclusionTest {
public void configure() {
GsonDataFormat weightExclusionFormat = new GsonDataFormat(TestPojoExclusion.class);
- weightExclusionFormat.setExclusionStrategies(Arrays.<ExclusionStrategy> asList(new WeightExclusionStrategy()));
+ weightExclusionFormat
+ .setExclusionStrategies(Arrays.<ExclusionStrategy> asList(new WeightExclusionStrategy()));
from("direct:inPojoExcludeWeight").marshal(weightExclusionFormat);
- from("direct:backPojoExcludeWeight").unmarshal(weightExclusionFormat).to("mock:reversePojoExcludeWeight");
+ from("direct:backPojoExcludeWeight").unmarshal(weightExclusionFormat)
+ .to("mock:reversePojoExcludeWeight");
- //START SNIPPET: format
+ // START SNIPPET: format
GsonDataFormat ageExclusionFormat = new GsonDataFormat(TestPojoExclusion.class);
- ageExclusionFormat.setExclusionStrategies(Arrays.<ExclusionStrategy> asList(new AgeExclusionStrategy()));
+ ageExclusionFormat
+ .setExclusionStrategies(Arrays.<ExclusionStrategy> asList(new AgeExclusionStrategy()));
from("direct:inPojoExcludeAge").marshal(ageExclusionFormat);
- //END SNIPPET: format
+ // END SNIPPET: format
from("direct:backPojoExcludeAge").unmarshal(ageExclusionFormat).to("mock:reversePojoExcludeAge");
}
};
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalListTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalListTest.java
index b6e86bc189a..161ec53bc4e 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalListTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalListTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
@@ -40,26 +39,18 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonMarshalListTest.class,
- GsonMarshalListTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonMarshalListTest.class,
+ GsonMarshalListTest.TestConfiguration.class })
public class GsonMarshalListTest {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reversePojo")
MockEndpoint mock;
-
@Test
public void testMarshalAndUnmarshalPojo() throws Exception {
@@ -86,7 +77,6 @@ public class GsonMarshalListTest {
mock.assertIsSatisfied();
}
-
// *************************************
// Config
// *************************************
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalTest.java
index ece5556ab76..5adc1f16bb7 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonMarshalTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import java.util.HashMap;
import java.util.Map;
@@ -38,32 +37,24 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonMarshalTest.class,
- GsonMarshalTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonMarshalTest.class,
+ GsonMarshalTest.TestConfiguration.class })
public class GsonMarshalTest {
@Autowired
CamelContext context;
-
+
@Autowired
ProducerTemplate template;
-
@EndpointInject("mock:reverse")
MockEndpoint mock;
-
+
@EndpointInject("mock:reversePojo")
MockEndpoint mockPojo;
-
@Test
public void testMarshalAndUnmarshalMap() throws Exception {
Map<String, String> in = new HashMap<>();
@@ -87,7 +78,6 @@ public class GsonMarshalTest {
TestPojo in = new TestPojo();
in.setName("Camel");
-
mockPojo.expectedMessageCount(1);
mockPojo.message(0).body().isInstanceOf(TestPojo.class);
mockPojo.message(0).body().isEqualTo(in);
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonUnmarshalTypeFromHeaderTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonUnmarshalTypeFromHeaderTest.java
index e075345385b..91cb7ca563e 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonUnmarshalTypeFromHeaderTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/GsonUnmarshalTypeFromHeaderTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.gson.GsonConstants;
@@ -34,31 +33,21 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- GsonUnmarshalTypeFromHeaderTest.class,
- GsonUnmarshalTypeFromHeaderTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, GsonUnmarshalTypeFromHeaderTest.class,
+ GsonUnmarshalTypeFromHeaderTest.TestConfiguration.class })
public class GsonUnmarshalTypeFromHeaderTest {
-
@Autowired
ProducerTemplate template;
-
-
-
@Test
public void testUnmarshalTypeFromHeader() {
String body = "{\"name\":\"my-name\"}";
String unmarshallType = "org.apache.camel.component.gson.springboot.TestPojo";
- TestPojo pojo = template.requestBodyAndHeader("direct:unmarshalTypeFromHeader", body, GsonConstants.UNMARSHAL_TYPE,
- unmarshallType, TestPojo.class);
+ TestPojo pojo = template.requestBodyAndHeader("direct:unmarshalTypeFromHeader", body,
+ GsonConstants.UNMARSHAL_TYPE, unmarshallType, TestPojo.class);
assertNotNull(pojo);
assertEquals("my-name", pojo.getName());
}
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonFieldNamePolicyTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonFieldNamePolicyTest.java
index e4e56d6eaed..ef20e2786e7 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonFieldNamePolicyTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonFieldNamePolicyTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
import com.google.gson.FieldNamingPolicy;
import org.apache.camel.ProducerTemplate;
@@ -34,30 +33,18 @@ import org.springframework.context.annotation.Bean;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SpringGsonFieldNamePolicyTest.class
- },
- properties = {
- "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonFieldNamePolicyTest.xml"}
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SpringGsonFieldNamePolicyTest.class }, properties = {
+ "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonFieldNamePolicyTest.xml" }
)
public class SpringGsonFieldNamePolicyTest {
-
@Autowired
ProducerTemplate template;
-
-
-
-
-
- @Bean(name = "gson")
+ @Bean(name = "gson")
GsonDataFormat getGsonDataFormat() {
GsonDataFormat gsonDataformat = new GsonDataFormat();
gsonDataformat.setUnmarshalTypeName("org.apache.camel.component.gson.springboot.PersonPojo");
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonJsonDataFormatTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonJsonDataFormatTest.java
index 1929c66b9ab..e78cba60250 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonJsonDataFormatTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonJsonDataFormatTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
-
import org.apache.camel.CamelContext;
import org.apache.camel.EndpointInject;
import org.apache.camel.ProducerTemplate;
@@ -34,40 +32,32 @@ import org.springframework.context.annotation.Bean;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SpringGsonJsonDataFormatTest.class
- },
- properties = {
- "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonJsonDataFormatTest.xml"}
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SpringGsonJsonDataFormatTest.class }, properties = {
+ "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonJsonDataFormatTest.xml" }
)
public class SpringGsonJsonDataFormatTest {
@Autowired
private CamelContext context;
-
+
@Autowired
ProducerTemplate template;
@EndpointInject("mock:reversePojo")
MockEndpoint mock;
-
-
-
- @Bean(name = "pretty")
+
+ @Bean(name = "pretty")
GsonDataFormat getPrettyGsonDataFormat() {
GsonDataFormat gsonDataformat = new GsonDataFormat();
gsonDataformat.setPrettyPrint(true);
gsonDataformat.setUnmarshalTypeName("org.apache.camel.component.gson.springboot.TestPojo");
return gsonDataformat;
}
-
- @Bean(name = "gson")
+
+ @Bean(name = "gson")
GsonDataFormat getGsonDataFormat() {
GsonDataFormat gsonDataformat = new GsonDataFormat();
gsonDataformat.setUnmarshalTypeName("org.apache.camel.component.gson.springboot.TestPojo");
@@ -104,9 +94,7 @@ public class SpringGsonJsonDataFormatTest {
Object marshalled = template.requestBody("direct:inPretty", in);
String marshalledAsString = context.getTypeConverter().convertTo(String.class, marshalled);
- String expected = "{\n"
- + " \"name\": \"Camel\""
- + "\n}";
+ String expected = "{\n" + " \"name\": \"Camel\"" + "\n}";
assertEquals(expected, marshalledAsString);
template.sendBody("direct:backPretty", marshalled);
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonUnmarshalTypeFromHeaderTest.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonUnmarshalTypeFromHeaderTest.java
index f23953bbc13..68458922d61 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonUnmarshalTypeFromHeaderTest.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/SpringGsonUnmarshalTypeFromHeaderTest.java
@@ -16,8 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
-
import org.apache.camel.ProducerTemplate;
import org.apache.camel.spring.boot.CamelAutoConfiguration;
import org.junit.jupiter.api.Test;
@@ -30,29 +28,21 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- SpringGsonUnmarshalTypeFromHeaderTest.class
- },
- properties = {
- "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonUnmarshalTypeFromHeaderTest.xml"}
+@SpringBootTest(classes = { CamelAutoConfiguration.class, SpringGsonUnmarshalTypeFromHeaderTest.class }, properties = {
+ "camel.springboot.routes-include-pattern=file:src/test/resources/routes/SpringGsonUnmarshalTypeFromHeaderTest.xml" }
)
public class SpringGsonUnmarshalTypeFromHeaderTest {
-
@Autowired
ProducerTemplate template;
-
-
@Test
public void testUnmarshalTypeFromHeader() {
- TestPojo pojo = template.requestBody("direct:springUnmarshalTypeFromHeader", "{\"name\":\"my-name\"}", TestPojo.class);
+ TestPojo pojo = template.requestBody("direct:springUnmarshalTypeFromHeader", "{\"name\":\"my-name\"}",
+ TestPojo.class);
assertNotNull(pojo);
assertEquals("my-name", pojo.getName());
}
diff --git a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/TestPojoExclusion.java b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/TestPojoExclusion.java
index 82811081e12..5e7728416d9 100644
--- a/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/TestPojoExclusion.java
+++ b/components-starter/camel-gson-starter/src/test/java/org/apache/camel/component/gson/springboot/TestPojoExclusion.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.gson.springboot;
-
public class TestPojoExclusion {
@ExcludeAge
diff --git a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/AckExpressionTest.java b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/AckExpressionTest.java
index 8707f577bfe..cc8537a16d1 100644
--- a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/AckExpressionTest.java
+++ b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/AckExpressionTest.java
@@ -16,11 +16,9 @@
*/
package org.apache.camel.component.hl7.springboot.test;
-
import static org.apache.camel.component.hl7.HL7.ack;
import static org.apache.camel.component.hl7.HL7.hl7terser;
-
import org.apache.camel.EndpointInject;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.builder.RouteBuilder;
@@ -37,7 +35,6 @@ import ca.uhn.hl7v2.model.v24.message.ACK;
import ca.uhn.hl7v2.model.v24.message.ADT_A01;
import ca.uhn.hl7v2.model.v24.segment.PID;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
@@ -45,33 +42,24 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- AckExpressionTest.class,
- AckExpressionTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, AckExpressionTest.class,
+ AckExpressionTest.TestConfiguration.class })
public class AckExpressionTest extends HL7TestSupport {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:result")
MockEndpoint mock;
-
@Test
public void testAckExpression() throws Exception {
ADT_A01 a01 = createADT01Message();
ACK ack = template.requestBody("direct:test1", a01, ACK.class);
assertEquals("AA", ack.getMSA().getAcknowledgementCode().getValue());
- assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID()
- .getValue());
+ assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID().getValue());
}
@Test
@@ -79,8 +67,7 @@ public class AckExpressionTest extends HL7TestSupport {
ADT_A01 a01 = createADT01Message();
ACK ack = template.requestBody("direct:test2", a01, ACK.class);
assertEquals("CA", ack.getMSA().getAcknowledgementCode().getValue());
- assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID()
- .getValue());
+ assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID().getValue());
}
@Test
@@ -88,10 +75,9 @@ public class AckExpressionTest extends HL7TestSupport {
ADT_A01 a01 = createADT01Message();
ACK ack = template.requestBody("direct:test3", a01, ACK.class);
assertEquals("AE", ack.getMSA().getAcknowledgementCode().getValue());
- assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID()
- .getValue());
- assertEquals(String.valueOf(ErrorCode.APPLICATION_INTERNAL_ERROR.getCode()), ack.getERR()
- .getErrorCodeAndLocation(0).getCodeIdentifyingError().getIdentifier().getValue());
+ assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID().getValue());
+ assertEquals(String.valueOf(ErrorCode.APPLICATION_INTERNAL_ERROR.getCode()),
+ ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError().getIdentifier().getValue());
}
@Test
@@ -99,12 +85,11 @@ public class AckExpressionTest extends HL7TestSupport {
ADT_A01 a01 = createADT01Message();
ACK ack = template.requestBody("direct:test4", a01, ACK.class);
assertEquals("AR", ack.getMSA().getAcknowledgementCode().getValue());
- assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID()
- .getValue());
- assertEquals(String.valueOf(ErrorCode.APPLICATION_INTERNAL_ERROR.getCode()), ack.getERR()
- .getErrorCodeAndLocation(0).getCodeIdentifyingError().getIdentifier().getValue());
- assertEquals("Problem!", ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError()
- .getAlternateText().getValue());
+ assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID().getValue());
+ assertEquals(String.valueOf(ErrorCode.APPLICATION_INTERNAL_ERROR.getCode()),
+ ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError().getIdentifier().getValue());
+ assertEquals("Problem!",
+ ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError().getAlternateText().getValue());
}
@Test
@@ -112,12 +97,11 @@ public class AckExpressionTest extends HL7TestSupport {
ADT_A01 a01 = createADT01Message();
ACK ack = template.requestBody("direct:test5", a01, ACK.class);
assertEquals("AR", ack.getMSA().getAcknowledgementCode().getValue());
- assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID()
- .getValue());
- assertEquals(String.valueOf(ErrorCode.DATA_TYPE_ERROR.getCode()), ack.getERR().getErrorCodeAndLocation(0)
- .getCodeIdentifyingError().getIdentifier().getValue());
- assertEquals("Problem!", ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError()
- .getAlternateText().getValue());
+ assertEquals(a01.getMSH().getMessageControlID().getValue(), ack.getMSA().getMessageControlID().getValue());
+ assertEquals(String.valueOf(ErrorCode.DATA_TYPE_ERROR.getCode()),
+ ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError().getIdentifier().getValue());
+ assertEquals("Problem!",
+ ack.getERR().getErrorCodeAndLocation(0).getCodeIdentifyingError().getAlternateText().getValue());
}
// *************************************
@@ -137,14 +121,14 @@ public class AckExpressionTest extends HL7TestSupport {
from("direct:test3").onException(HL7Exception.class).handled(true).transform(ack()).end()
.transform(hl7terser("/.BLORG"));
from("direct:test4").onException(HL7Exception.class).handled(true)
- .transform(ack(AcknowledgmentCode.AR, "Problem!", ErrorCode.APPLICATION_INTERNAL_ERROR)).end()
- .transform(hl7terser("/.BLORG"));
+ .transform(ack(AcknowledgmentCode.AR, "Problem!", ErrorCode.APPLICATION_INTERNAL_ERROR))
+ .end().transform(hl7terser("/.BLORG"));
from("direct:test5").transform(ack(AcknowledgmentCode.AR, "Problem!", ErrorCode.DATA_TYPE_ERROR));
}
};
}
}
-
+
private static ADT_A01 createADT01Message() throws Exception {
ADT_A01 adt = new ADT_A01();
adt.initQuickstart("ADT", "A01", "P");
diff --git a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/ConvertLineFeedTest.java b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/ConvertLineFeedTest.java
index 4b12fdb958c..8e7e7093bfd 100644
--- a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/ConvertLineFeedTest.java
+++ b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/ConvertLineFeedTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.hl7.springboot.test;
-
import static org.apache.camel.component.hl7.HL7.convertLFToCR;
import org.apache.camel.ProducerTemplate;
@@ -26,8 +25,6 @@ import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.context.annotation.Bean;
@@ -35,24 +32,15 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- ConvertLineFeedTest.class,
- ConvertLineFeedTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, ConvertLineFeedTest.class,
+ ConvertLineFeedTest.TestConfiguration.class })
public class ConvertLineFeedTest extends HL7TestSupport {
-
@Autowired
ProducerTemplate template;
-
@Test
public void testConvertLineFeed() throws Exception {
String s = "line1\nline2\rline3";
@@ -77,5 +65,5 @@ public class ConvertLineFeedTest extends HL7TestSupport {
};
}
}
-
+
}
diff --git a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7ByteArrayRouteTest.java b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7ByteArrayRouteTest.java
index f9cb175405d..a7559595a57 100644
--- a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7ByteArrayRouteTest.java
+++ b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7ByteArrayRouteTest.java
@@ -45,33 +45,24 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- HL7ByteArrayRouteTest.class,
- HL7ByteArrayRouteTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, HL7ByteArrayRouteTest.class,
+ HL7ByteArrayRouteTest.TestConfiguration.class })
public class HL7ByteArrayRouteTest extends HL7TestSupport {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:a01")
MockEndpoint mock01;
-
+
@EndpointInject("mock:a19")
MockEndpoint mock19;
-
+
@EndpointInject("mock:unknown")
MockEndpoint mockUnknow;
-
@Bean("hl7codec")
public HL7MLLPCodec addHl7MllpCodec() throws Exception {
HL7MLLPCodec codec = new HL7MLLPCodec();
@@ -99,8 +90,8 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
in.append("\r");
in.append(line2);
- String out = template.requestBody("mina:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec", in.toString(),
- String.class);
+ String out = template.requestBody("mina:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec",
+ in.toString(), String.class);
String[] lines = out.split("\r");
assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADR^A19||||123|||||UNICODE UTF-8", lines[0]);
@@ -111,7 +102,7 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
@Test
public void testSendA01() throws Exception {
-
+
mock01.expectedMessageCount(1);
mock01.message(0).body().isInstanceOf(Message.class);
@@ -123,8 +114,8 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
in.append("\r");
in.append(line2);
- String out = template.requestBody("mina:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec", in.toString(),
- String.class);
+ String out = template.requestBody("mina:tcp://127.0.0.1:" + getPort() + "?sync=true&codec=#hl7codec",
+ in.toString(), String.class);
String[] lines = out.split("\r");
assertEquals("MSH|^~\\&|MYSENDER||||200701011539||ADT^A01||||123|||||UNICODE UTF-8", lines[0]);
assertEquals("PID|||123||Döe^John", lines[1]);
@@ -134,7 +125,7 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
@Test
public void testSendUnknown() throws Exception {
-
+
mockUnknow.expectedMessageCount(1);
mockUnknow.message(0).body().isInstanceOf(Message.class);
@@ -178,11 +169,12 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
.choice()
// where we choose that A19 queries invoke the handleA19
// method on our hl7service bean
- .when(header("CamelHL7TriggerEvent").isEqualTo("A19")).bean("hl7service", "handleA19").to("mock:a19")
+ .when(header("CamelHL7TriggerEvent").isEqualTo("A19")).bean("hl7service", "handleA19")
+ .to("mock:a19")
// and A01 should invoke the handleA01 method on our
// hl7service bean
- .when(header("CamelHL7TriggerEvent").isEqualTo("A01")).to("mock:a01").bean("hl7service", "handleA01")
- .to("mock:a19")
+ .when(header("CamelHL7TriggerEvent").isEqualTo("A01")).to("mock:a01")
+ .bean("hl7service", "handleA01").to("mock:a19")
// other types should go to mock:unknown
.otherwise().to("mock:unknown")
// end choice block
@@ -194,7 +186,7 @@ public class HL7ByteArrayRouteTest extends HL7TestSupport {
};
}
}
-
+
public class MyHL7BusinessLogic {
// This is a plain POJO that has NO imports whatsoever on Apache Camel.
diff --git a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7DataFormatTest.java b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7DataFormatTest.java
index d634fea62db..780fe5c1fb5 100644
--- a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7DataFormatTest.java
+++ b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7DataFormatTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.hl7.springboot.test;
-
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.nio.charset.Charset;
@@ -48,32 +47,24 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- HL7DataFormatTest.class,
- HL7DataFormatTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, HL7DataFormatTest.class,
+ HL7DataFormatTest.TestConfiguration.class })
public class HL7DataFormatTest extends HL7TestSupport {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:marshal")
MockEndpoint mockMarshal;
-
+
@EndpointInject("mock:unmarshal")
MockEndpoint mockUnmarshal;
-
+
@EndpointInject("mock:unmarshalBig5")
MockEndpoint mockUnmarshalBig5;
-
private static final String NONE_ISO_8859_1 = "\u221a\u00c4\u221a\u00e0\u221a\u00e5\u221a\u00ed\u221a\u00f4\u2248\u00ea";
private static HL7DataFormat hl7 = new HL7DataFormat();
@@ -179,7 +170,8 @@ public class HL7DataFormatTest extends HL7TestSupport {
mockUnmarshal.reset();
mockUnmarshal.expectedMessageCount(1);
mockUnmarshal.message(0).body().isInstanceOf(Message.class);
- mockUnmarshal.expectedHeaderReceived(HL7Constants.HL7_CHARSET, HL7Charset.getHL7Charset(charset).getHL7CharsetName());
+ mockUnmarshal.expectedHeaderReceived(HL7Constants.HL7_CHARSET,
+ HL7Charset.getHL7Charset(charset).getHL7CharsetName());
mockUnmarshal.expectedHeaderReceived(Exchange.CHARSET_NAME, charset);
// Message with explicit encoding in MSH-18
@@ -197,7 +189,7 @@ public class HL7DataFormatTest extends HL7TestSupport {
@Test
public void testUnmarshalWithImplicitBig5Charset() throws Exception {
String charset = "Big5";
-
+
mockUnmarshalBig5.expectedMessageCount(1);
mockUnmarshalBig5.message(0).body().isInstanceOf(Message.class);
mockUnmarshalBig5.expectedHeaderReceived(HL7Constants.HL7_CHARSET, null);
@@ -236,7 +228,7 @@ public class HL7DataFormatTest extends HL7TestSupport {
};
}
}
-
+
private static String createHL7AsString() {
return createHL7WithCharsetAsString(null);
}
@@ -244,7 +236,8 @@ public class HL7DataFormatTest extends HL7TestSupport {
private static String createHL7WithCharsetAsString(HL7Charset charset) {
String hl7Charset = charset == null ? "" : charset.getHL7CharsetName();
String line1 = String.format(
- "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||QRY^A19|1234|P|2.4||||||%s", hl7Charset);
+ "MSH|^~\\&|MYSENDER|MYSENDERAPP|MYCLIENT|MYCLIENTAPP|200612211200||QRY^A19|1234|P|2.4||||||%s",
+ hl7Charset);
String line2 = "QRD|200612211200|R|I|GetPatient|||1^RD|0101701234|DEM||";
StringBuilder body = new StringBuilder();
diff --git a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7MLLPCodecBoundaryTest.java b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7MLLPCodecBoundaryTest.java
index 38b4404d429..67c3c71eb1e 100644
--- a/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7MLLPCodecBoundaryTest.java
+++ b/components-starter/camel-hl7-starter/src/test/java/org/apache/camel/component/hl7/springboot/test/HL7MLLPCodecBoundaryTest.java
@@ -16,7 +16,6 @@
*/
package org.apache.camel.component.hl7.springboot.test;
-
import java.io.BufferedReader;
import java.io.InputStreamReader;
@@ -42,26 +41,18 @@ import org.springframework.test.annotation.DirtiesContext;
import org.apache.camel.test.spring.junit5.CamelSpringBootTest;
import org.apache.camel.util.IOHelper;
-
@DirtiesContext
@CamelSpringBootTest
-@SpringBootTest(
- classes = {
- CamelAutoConfiguration.class,
- HL7MLLPCodecBoundaryTest.class,
- HL7MLLPCodecBoundaryTest.TestConfiguration.class
- }
-)
+@SpringBootTest(classes = { CamelAutoConfiguration.class, HL7MLLPCodecBoundaryTest.class,
+ HL7MLLPCodecBoundaryTest.TestConfiguration.class })
public class HL7MLLPCodecBoundaryTest extends HL7TestSupport {
-
@Autowired
ProducerTemplate template;
@EndpointInject("mock:result")
MockEndpoint mock;
-
@Bean("hl7codec")
private HL7MLLPCodec getHl7MllpCodec() throws Exception {
HL7MLLPCodec codec = new HL7MLLPCodec();
@@ -69,10 +60,10 @@ public class HL7MLLPCodecBoundaryTest extends HL7TestSupport {
return codec;
... 52188 lines suppressed ...