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.git
The following commit(s) were added to refs/heads/main by this push: new 6636db4 Regen 6636db4 is described below commit 6636db4c85d27e878a4b5c4400745fb225ad0c49 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun Feb 20 10:17:55 2022 +0100 Regen --- .../camel/catalog/components/hwcloud-frs.json | 2 +- .../component/huaweicloud/frs/hwcloud-frs.json | 2 +- .../src/main/docs/hwcloud-frs-component.adoc | 2 +- .../frs/FaceRecognitionInvalidParamsTest.java | 212 +++++++++++---------- 4 files changed, 118 insertions(+), 100 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hwcloud-frs.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hwcloud-frs.json index 6511114..b206dd0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hwcloud-frs.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hwcloud-frs.json @@ -2,7 +2,7 @@ "component": { "kind": "component", "name": "hwcloud-frs", - "title": "Huawei Cloud Face Recognition Service", + "title": "Huawei Cloud Face Recognition Service (FRS)", "description": "Face Recognition Service (FRS) is an intelligent service that uses computers to process, analyze, and understand facial images based on human facial features.", "deprecated": false, "firstVersion": "3.15.0", diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/generated/resources/org/apache/camel/component/huaweicloud/frs/hwcloud-frs.json b/components/camel-huawei/camel-huaweicloud-frs/src/generated/resources/org/apache/camel/component/huaweicloud/frs/hwcloud-frs.json index 6511114..b206dd0 100644 --- a/components/camel-huawei/camel-huaweicloud-frs/src/generated/resources/org/apache/camel/component/huaweicloud/frs/hwcloud-frs.json +++ b/components/camel-huawei/camel-huaweicloud-frs/src/generated/resources/org/apache/camel/component/huaweicloud/frs/hwcloud-frs.json @@ -2,7 +2,7 @@ "component": { "kind": "component", "name": "hwcloud-frs", - "title": "Huawei Cloud Face Recognition Service", + "title": "Huawei Cloud Face Recognition Service (FRS)", "description": "Face Recognition Service (FRS) is an intelligent service that uses computers to process, analyze, and understand facial images based on human facial features.", "deprecated": false, "firstVersion": "3.15.0", diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/main/docs/hwcloud-frs-component.adoc b/components/camel-huawei/camel-huaweicloud-frs/src/main/docs/hwcloud-frs-component.adoc index ad403b0..213291c 100644 --- a/components/camel-huawei/camel-huaweicloud-frs/src/main/docs/hwcloud-frs-component.adoc +++ b/components/camel-huawei/camel-huaweicloud-frs/src/main/docs/hwcloud-frs-component.adoc @@ -1,4 +1,4 @@ -= Huawei Cloud Face Recognition Service Component += Huawei Cloud Face Recognition Service (FRS) Component :doctitle: Huawei Cloud Face Recognition Service (FRS) :shortname: hwcloud-frs :artifactid: camel-huaweicloud-frs diff --git a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java index 340cb2a..4ecc6552c5 100644 --- a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java +++ b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java @@ -35,143 +35,148 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { public void configure() { from("direct:access_key_not_set") .to("hwcloud-frs:faceDetection?" - + "secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:secret_key_not_set") .to("hwcloud-frs:faceDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:project_id_not_set") .to("hwcloud-frs:faceDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:region_id_not_set") .to("hwcloud-frs:faceDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:operation_not_set") .to("hwcloud-frs:?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:operation_invalid") .to("hwcloud-frs:test?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_detection_image_not_set") .to("hwcloud-frs:faceDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_detection_image_file_not_found") .setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH, constant(testFilePath)) .to("hwcloud-frs:faceDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_verification_image_not_set") .to("hwcloud-frs:faceVerification?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_verification_only_one_image_set") - .setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH, constant(testConfiguration.getProperty("imageFilePath"))) + .setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH, + constant(testConfiguration.getProperty("imageFilePath"))) .to("hwcloud-frs:faceVerification?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_verification_image_sources_not_match") - .setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64, constant(testConfiguration.getProperty("imageBase64"))) - .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_URL, constant(testConfiguration.getProperty("imageFilePath"))) + .setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64, + constant(testConfiguration.getProperty("imageBase64"))) + .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_URL, + constant(testConfiguration.getProperty("imageFilePath"))) .to("hwcloud-frs:faceVerification?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_verification_image_file_not_found") .setProperty(FaceRecognitionProperties.FACE_IMAGE_FILE_PATH, constant(testFilePath)) - .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_FILE_PATH, constant(testConfiguration.getProperty("imageFilePath"))) + .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_FILE_PATH, + constant(testConfiguration.getProperty("imageFilePath"))) .to("hwcloud-frs:faceVerification?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_live_detection_video_not_set") .to("hwcloud-frs:faceLiveDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&actions=1,2,3" - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&actions=1,2,3" + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_live_detection_video_file_not_found") .setProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH, constant(testFilePath)) .to("hwcloud-frs:faceLiveDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&actions=1,2,3" - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&actions=1,2,3" + + "&ignoreSslVerification=true") .to("mock:result"); from("direct:face_live_detection_actions_not_set") - .setProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH, constant(testConfiguration.getProperty("videoFilePath"))) + .setProperty(FaceRecognitionProperties.FACE_VIDEO_FILE_PATH, + constant(testConfiguration.getProperty("videoFilePath"))) .to("hwcloud-frs:faceLiveDetection?" - + "accessKey=" + testConfiguration.getProperty("accessKey") - + "&secretKey=" + testConfiguration.getProperty("secretKey") - + "&projectId=" + testConfiguration.getProperty("projectId") - + "®ion=" + testConfiguration.getProperty("region") - + "&ignoreSslVerification=true") + + "accessKey=" + testConfiguration.getProperty("accessKey") + + "&secretKey=" + testConfiguration.getProperty("secretKey") + + "&projectId=" + testConfiguration.getProperty("projectId") + + "®ion=" + testConfiguration.getProperty("region") + + "&ignoreSslVerification=true") .to("mock:result"); } }; @@ -182,7 +187,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testAccessKeyNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:access_key_not_set", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:access_key_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "authentication parameter access key (AK) not found"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -193,7 +199,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testSecretKeyNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:secret_key_not_set", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:secret_key_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "authentication parameter secret key (SK) not found"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -204,7 +211,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testProjectIdNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:project_id_not_set", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:project_id_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "Project id not found"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -215,7 +223,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testRegionIdNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:region_id_not_set", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:region_id_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "either endpoint or region needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -226,7 +235,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testOperationNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:operation_not_set", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:operation_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "operation needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -237,7 +247,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testOperationInvalid() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:operation_invalid", "")); + Exception exception + = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:operation_invalid", "")); assertTrue(exception.getCause() instanceof UnsupportedOperationException); String expectedMessage = "operation needs to be faceDetection, faceVerification or faceLiveDetection"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -248,7 +259,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceDetectionImageNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_detection_image_not_set", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_detection_image_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "any one of image base64, url and filePath needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -259,7 +271,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceDetectionImageFileInvalid() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_detection_image_file_not_found", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_detection_image_file_not_found", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = String.format("File path is invalid: %s", testFilePath); assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -270,7 +283,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceVerificationImageNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_verification_image_not_set", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_verification_image_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "any one of image base64, url and filePath needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -281,22 +295,22 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceVerificationOnlyOneImageSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_verification_only_one_image_set", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_verification_only_one_image_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "any one of image base64, url and filePath needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); } - /** - * sources of two images do not match when operation is faceVerification - * If imageBase64 is configured, then anotherImageBase64 needs to be configured - * If imageUrl is configured, then anotherImageUrl needs to be configured + * sources of two images do not match when operation is faceVerification If imageBase64 is configured, then + * anotherImageBase64 needs to be configured If imageUrl is configured, then anotherImageUrl needs to be configured * If imageFilePath is configured, then anotherImageFilePath needs to be configured */ @Test public void testFaceVerificationImageSourcesNotMatch() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_verification_image_sources_not_match", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_verification_image_sources_not_match", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "any one of image base64, url and filePath needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -307,7 +321,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceVerificationImageFileInvalid() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_verification_image_file_not_found", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_verification_image_file_not_found", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = String.format("File path is invalid: %s", testFilePath); assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -318,7 +333,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceLiveDetectionVideoNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_live_detection_video_not_set", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_live_detection_video_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "any one of video base64, url and filePath needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -329,7 +345,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceLiveDetectionVideoFileInvalid() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_live_detection_video_file_not_found", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_live_detection_video_file_not_found", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = String.format("File path is invalid: %s", testFilePath); assertTrue(exception.getCause().getMessage().contains(expectedMessage)); @@ -340,7 +357,8 @@ public class FaceRecognitionInvalidParamsTest extends CamelTestSupport { */ @Test public void testFaceLiveDetectionVideoActionsNotSet() { - Exception exception = assertThrows(CamelExecutionException.class, () -> template.sendBody("direct:face_live_detection_actions_not_set", "")); + Exception exception = assertThrows(CamelExecutionException.class, + () -> template.sendBody("direct:face_live_detection_actions_not_set", "")); assertTrue(exception.getCause() instanceof IllegalArgumentException); String expectedMessage = "actions needs to be set"; assertTrue(exception.getCause().getMessage().contains(expectedMessage));