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 0bef233 CAMEL-17683: Modify document of HuaweiCloud Face Recognition
Service (FRS) Component and add some test cases (#6983)
0bef233 is described below
commit 0bef23306a1084f7a00a1a558ab95969543595e3
Author: Hokutor <[email protected]>
AuthorDate: Sun Feb 20 17:16:22 2022 +0800
CAMEL-17683: Modify document of HuaweiCloud Face Recognition Service (FRS)
Component and add some test cases (#6983)
* CAMEL-17683: Modify document of HuaweiCloud Face Recognition Service
(FRS) Component and add some test cases
Co-Authored-By: lyndonmiao <[email protected]>
* CAMEL-17683: Modify document of HuaweiCloud Face Recognition Service
(FRS) Component and add some test cases
Co-Authored-By: lyndonmiao <[email protected]>
Co-authored-by: lyndonmiao <[email protected]>
---
.../src/main/docs/hwcloud-frs-component.adoc | 6 +-
.../huaweicloud/frs/FaceRecognitionEndpoint.java | 2 +-
.../frs/FaceRecognitionInvalidParamsTest.java | 348 +++++++++++++++++++++
...ceDetectionWithImageBae64AndMockClientTest.java | 8 +-
...aceDetectionWithImageFileAndMockClientTest.java | 8 +-
...FaceDetectionWithImageUrlAndMockClientTest.java | 8 +-
...erificationWithImageBae64AndMockClientTest.java | 8 +-
...VerificationWithImageFileAndMockClientTest.java | 8 +-
...eVerificationWithImageUrlAndMockClientTest.java | 8 +-
.../huaweicloud/frs/{ => mock}/FrsClientMock.java | 2 +-
...veDetectionWithVideoBae64AndMockClientTest.java | 8 +-
...iveDetectionWithVideoFileAndMockClientTest.java | 8 +-
...LiveDetectionWithVideoUrlAndMockClientTest.java | 8 +-
.../huaweicloud/frs/{ => mock}/MockResult.java | 2 +-
.../FaceDetectionWithImageBae64Test.java | 3 +-
.../{ => real}/FaceDetectionWithImageFileTest.java | 3 +-
.../{ => real}/FaceDetectionWithImageUrlTest.java | 3 +-
.../FaceVerificationWithImageBae64Test.java | 3 +-
.../FaceVerificationWithImageFileTest.java | 3 +-
.../FaceVerificationWithImageUrlTest.java | 3 +-
.../LiveDetectionWithVideoBae64Test.java | 3 +-
.../{ => real}/LiveDetectionWithVideoFileTest.java | 3 +-
.../{ => real}/LiveDetectionWithVideoUrlTest.java | 3 +-
23 files changed, 435 insertions(+), 24 deletions(-)
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 8c1be0d..ad403b0 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,5 +1,5 @@
= Huawei Cloud Face Recognition Service Component
-:doctitle: Huawei Cloud Face Recognition Service
+:doctitle: Huawei Cloud Face Recognition Service (FRS)
:shortname: hwcloud-frs
:artifactid: camel-huaweicloud-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.
@@ -125,8 +125,8 @@ Java DSL
[source,java]
----
from("direct:triggerRoute")
- .setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64,
RAW("/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk..."))
- .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_BASE64,
RAW("/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDAsLDBgREg4THBgdHRsYGxofIywlHyEqIRobJjQnKi4vMTIxHiU2Os..."))
+ .setProperty(FaceRecognitionProperties.FACE_IMAGE_BASE64,
constant("/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAA0JCgsKCA0LCgsODg0PEyAVExISEyccHhcgLikxMC4pLSwzOko+MzZGNywtQFdBRkxOUlNSMj5aYVpQYEpRUk..."))
+ .setProperty(FaceRecognitionProperties.ANOTHER_FACE_IMAGE_BASE64,
constant("/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgFBgcGBQgHBgcJCAgJDBMMDAsLDBgREg4THBgdHRsYGxofIywlHyEqIRobJjQnKi4vMTIxHiU2Os..."))
.to("hwcloud-frs:faceVerification?accessKey=*********&secretKey=********&projectId=9071a38e7f6a4ba7b7bcbeb7d4ea6efc®ion=cn-north-4")
----
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionEndpoint.java
b/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionEndpoint.java
index 4ba3a52..63e7d90 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionEndpoint.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/main/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionEndpoint.java
@@ -32,7 +32,7 @@ import org.apache.camel.support.DefaultEndpoint;
* Face Recognition Service (FRS) is an intelligent service that uses
computers to process, analyze, and understand
* facial images based on human facial features.
*/
-@UriEndpoint(firstVersion = "3.15.0", scheme = "hwcloud-frs", title = "Huawei
Cloud Face Recognition Service",
+@UriEndpoint(firstVersion = "3.15.0", scheme = "hwcloud-frs", title = "Huawei
Cloud Face Recognition Service (FRS)",
syntax = "hwcloud-frs:operation",
category = { Category.CLOUD, Category.MESSAGING }, producerOnly =
true)
public class FaceRecognitionEndpoint extends DefaultEndpoint {
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
new file mode 100644
index 0000000..340cb2a
--- /dev/null
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceRecognitionInvalidParamsTest.java
@@ -0,0 +1,348 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.huaweicloud.frs;
+
+import org.apache.camel.CamelExecutionException;
+import org.apache.camel.builder.RouteBuilder;
+import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+public class FaceRecognitionInvalidParamsTest extends CamelTestSupport {
+ private final TestConfiguration testConfiguration = new
TestConfiguration();
+
+ private final String testFilePath = "test_file";
+
+ protected RouteBuilder createRouteBuilder() {
+ return new RouteBuilder() {
+ 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")
+ .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")
+ .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")
+ .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")
+ .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")
+ .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")
+ .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")
+ .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")
+ .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")
+ .to("mock:result");
+
+ from("direct:face_verification_only_one_image_set")
+
.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")
+ .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")))
+ .to("hwcloud-frs:faceVerification?"
+ + "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")))
+ .to("hwcloud-frs:faceVerification?"
+ + "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")
+ .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")
+ .to("mock:result");
+
+ from("direct:face_live_detection_actions_not_set")
+
.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")
+ .to("mock:result");
+ }
+ };
+ }
+
+ /**
+ * access key is not set
+ */
+ @Test
+ public void testAccessKeyNotSet() {
+ 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));
+ }
+
+ /**
+ * secret key is not set
+ */
+ @Test
+ public void testSecretKeyNotSet() {
+ 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));
+ }
+
+ /**
+ * project id is not set
+ */
+ @Test
+ public void testProjectIdNotSet() {
+ 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));
+ }
+
+ /**
+ * region id or endpoint is not set
+ */
+ @Test
+ public void testRegionIdNotSet() {
+ 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));
+ }
+
+ /**
+ * operation is not set
+ */
+ @Test
+ public void testOperationNotSet() {
+ 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));
+ }
+
+ /**
+ * operation is invalid
+ */
+ @Test
+ public void testOperationInvalid() {
+ 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));
+ }
+
+ /**
+ * image base64, url or filePath is not set when operation is faceDetection
+ */
+ @Test
+ public void testFaceDetectionImageNotSet() {
+ 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));
+ }
+
+ /**
+ * image filePath is invalid when operation is faceDetection
+ */
+ @Test
+ public void testFaceDetectionImageFileInvalid() {
+ 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));
+ }
+
+ /**
+ * image base64, url or filePath is not set when operation is
faceVerification
+ */
+ @Test
+ public void testFaceVerificationImageNotSet() {
+ 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));
+ }
+
+ /**
+ * only one image source is set when operation is faceVerification
+ */
+ @Test
+ public void testFaceVerificationOnlyOneImageSet() {
+ 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
+ * 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", ""));
+ 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));
+ }
+
+ /**
+ * image filePath is invalid when operation is faceVerification
+ */
+ @Test
+ public void testFaceVerificationImageFileInvalid() {
+ 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));
+ }
+
+ /**
+ * video base64, url or filePath is not set when operation is
faceLiveDetection
+ */
+ @Test
+ public void testFaceLiveDetectionVideoNotSet() {
+ 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));
+ }
+
+ /**
+ * video filePath is invalid when operation is faceLiveDetection
+ */
+ @Test
+ public void testFaceLiveDetectionVideoFileInvalid() {
+ 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));
+ }
+
+ /**
+ * actions are not set when operation is faceLiveDetection
+ */
+ @Test
+ public void testFaceLiveDetectionVideoActionsNotSet() {
+ 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));
+ }
+}
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageBae64AndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageBae64AndMockClientTest.java
index 5647878..919f0e9 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64AndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageBae64AndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByBase64Response;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -53,6 +54,11 @@ public class FaceDetectionWithImageBae64AndMockClientTest
extends CamelTestSuppo
};
}
+ /**
+ * use imageBase64 to perform faceDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageFileAndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageFileAndMockClientTest.java
index b95e991..ee903f4 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageFileAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByFileResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -53,6 +54,11 @@ public class FaceDetectionWithImageFileAndMockClientTest
extends CamelTestSuppor
};
}
+ /**
+ * use imageFilePath to perform faceDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageUrlAndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageUrlAndMockClientTest.java
index c868de7..8c62390 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceDetectionWithImageUrlAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByUrlResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -53,6 +54,11 @@ public class FaceDetectionWithImageUrlAndMockClientTest
extends CamelTestSupport
};
}
+ /**
+ * use imageUrl to perform faceDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64AndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
similarity index 94%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64AndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
index 51d7a9b..e81901b 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64AndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageBae64AndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByBase64Response;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -55,6 +56,11 @@ public class FaceVerificationWithImageBae64AndMockClientTest
extends CamelTestSu
};
}
+ /**
+ * use imageBase64 to perform faceVerification
+ *
+ * @throws Exception
+ */
@Test
public void testFaceVerification() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_verification_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
similarity index 94%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
index ade011d..1b7026e 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageFileAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByFileResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -55,6 +56,11 @@ public class FaceVerificationWithImageFileAndMockClientTest
extends CamelTestSup
};
}
+ /**
+ * use imageFilePath to perform faceVerification
+ *
+ * @throws Exception
+ */
@Test
public void testFaceVerification() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_verification_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
similarity index 94%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
index 1f2a5da..67657ee 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FaceVerificationWithImageUrlAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByUrlResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -55,6 +56,11 @@ public class FaceVerificationWithImageUrlAndMockClientTest
extends CamelTestSupp
};
}
+ /**
+ * use imageUrl to perform faceVerification
+ *
+ * @throws Exception
+ */
@Test
public void testFaceVerification() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_face_verification_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FrsClientMock.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FrsClientMock.java
similarity index 98%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FrsClientMock.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FrsClientMock.java
index 2c6ecc5..3462d1d 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FrsClientMock.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/FrsClientMock.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import java.util.*;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
index 80c481b..5b94066 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64AndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoBae64AndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByBase64Response;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -54,6 +55,11 @@ public class LiveDetectionWithVideoBae64AndMockClientTest
extends CamelTestSuppo
};
}
+ /**
+ * use videoBase64 to perform faceLiveDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_live_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
index 2f41d01..27cf3f5 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoFileAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByFileResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -54,6 +55,11 @@ public class LiveDetectionWithVideoFileAndMockClientTest
extends CamelTestSuppor
};
}
+ /**
+ * use videoFilePath to perform faceLiveDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_live_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
similarity index 93%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
index 4d02bb2..79db135 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlAndMockClientTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/LiveDetectionWithVideoUrlAndMockClientTest.java
@@ -14,12 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByUrlResponse;
import org.apache.camel.BindToRegistry;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
@@ -54,6 +55,11 @@ public class LiveDetectionWithVideoUrlAndMockClientTest
extends CamelTestSupport
};
}
+ /**
+ * use videoUrl to perform faceLiveDetection
+ *
+ * @throws Exception
+ */
@Test
public void testFaceDetection() throws Exception {
MockEndpoint mock =
getMockEndpoint("mock:perform_live_detection_result");
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/MockResult.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/MockResult.java
similarity index 97%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/MockResult.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/MockResult.java
index ea2832b..904e58f 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/MockResult.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/mock/MockResult.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.mock;
import java.util.*;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64Test.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageBae64Test.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64Test.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageBae64Test.java
index 4db4056..4e23c10 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageBae64Test.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageBae64Test.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByBase64Response;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageFileTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageFileTest.java
index 2b776d7..a0219aa 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageFileTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageFileTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByFileResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageUrlTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageUrlTest.java
index 66f5bef..e6a4c99 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceDetectionWithImageUrlTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceDetectionWithImageUrlTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectFaceByUrlResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64Test.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageBae64Test.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64Test.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageBae64Test.java
index 06c1efd..431e72c 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageBae64Test.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageBae64Test.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByBase64Response;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageFileTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageFileTest.java
index 1127001..f3b56e1 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageFileTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageFileTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByFileResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageUrlTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageUrlTest.java
index 7e7a423..f5f74c0 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/FaceVerificationWithImageUrlTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/FaceVerificationWithImageUrlTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.CompareFaceByUrlResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64Test.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoBae64Test.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64Test.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoBae64Test.java
index a3ec0e1..f6cafc2 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoBae64Test.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoBae64Test.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByBase64Response;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoFileTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoFileTest.java
index a20584f..cfb17c4 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoFileTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoFileTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByFileResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
diff --git
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlTest.java
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoUrlTest.java
similarity index 96%
rename from
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlTest.java
rename to
components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoUrlTest.java
index 84bfe52..64171e9 100644
---
a/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/LiveDetectionWithVideoUrlTest.java
+++
b/components/camel-huawei/camel-huaweicloud-frs/src/test/java/org/apache/camel/component/huaweicloud/frs/real/LiveDetectionWithVideoUrlTest.java
@@ -14,11 +14,12 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.component.huaweicloud.frs;
+package org.apache.camel.component.huaweicloud.frs.real;
import com.huaweicloud.sdk.frs.v2.model.DetectLiveByUrlResponse;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.huaweicloud.frs.TestConfiguration;
import
org.apache.camel.component.huaweicloud.frs.constants.FaceRecognitionProperties;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;