From 9d0c50bbd0ea582cd6d0cb7b49e31ade76214229 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Mon, 19 Aug 2024 15:53:35 +0200 Subject: [PATCH 01/16] Remove Ar2QA and update URLs in QA Deleted the `Ar2QA` class to eliminate redundancy and adjusted the URL constants in `QA` class to point to the correct QA environment. This streamlines the QA environment handling within the codebase. --- .../dke/data/agrirouter/api/env/Ar2QA.java | 27 ------------------- .../com/dke/data/agrirouter/api/env/QA.java | 8 ++---- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/Ar2QA.java diff --git a/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/Ar2QA.java b/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/Ar2QA.java deleted file mode 100644 index 9b8abbae..00000000 --- a/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/Ar2QA.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.dke.data.agrirouter.api.env; - -/** - * Abstraction of the QA environment, currently no overrides because the default is QA already. - */ -public abstract class Ar2QA implements Environment { - - private static final String ENV_BASE_URL = "https://app.qa.agrirouter.farm"; - private static final String API_PREFIX = "/api/v1.0"; - private static final String REGISTRATION_SERVICE_URL = - "https://endpoint-service.qa.agrirouter.farm"; - - @Override - public String getEnvironmentBaseUrl() { - return ENV_BASE_URL; - } - - @Override - public String getApiPrefix() { - return API_PREFIX; - } - - @Override - public String getRegistrationServiceUrl() { - return REGISTRATION_SERVICE_URL; - } -} diff --git a/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/QA.java b/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/QA.java index c7ff69dd..78a1e428 100644 --- a/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/QA.java +++ b/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/env/QA.java @@ -2,17 +2,13 @@ /** * Abstraction of the QA environment, currently no overrides because the default is QA already. - * - * @deprecated This class is deprecated and will be removed in future versions. - * The new agrirouter environment will be the default to use */ -@Deprecated(since = "3.2.0", forRemoval = true) public abstract class QA implements Environment { - private static final String ENV_BASE_URL = "https://agrirouter-qa.cfapps.eu10.hana.ondemand.com"; + private static final String ENV_BASE_URL = "https://app.qa.agrirouter.farm"; private static final String API_PREFIX = "/api/v1.0"; private static final String REGISTRATION_SERVICE_URL = - "https://agrirouter-registration-service-hubqa-eu10.cfapps.eu10.hana.ondemand.com"; + "https://endpoint-service.qa.agrirouter.farm"; @Override public String getEnvironmentBaseUrl() { From 007b310fc6fd961ddf53bae1af9e4e10d142c702 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Mon, 19 Aug 2024 15:54:16 +0200 Subject: [PATCH 02/16] Add support for MQTT communication unit and DKE ping Introduced MQTT_COMMUNICATION_UNIT in OnboardingResponseRepository and added a corresponding fixture. Updated certification details and added DKE_PING to SystemMessageType for improved system messaging capabilities. --- .../agrirouter/api/enums/SystemMessageType.kt | 3 +- .../test/AbstractIntegrationTest.java | 151 +++++++++--------- .../test/OnboardingResponseRepository.java | 3 +- .../fixture/MqttCommunicationUnitFixture.java | 83 ++++++++++ 4 files changed, 162 insertions(+), 78 deletions(-) create mode 100644 agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java diff --git a/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/enums/SystemMessageType.kt b/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/enums/SystemMessageType.kt index 4e5165e9..02e96f62 100644 --- a/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/enums/SystemMessageType.kt +++ b/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/enums/SystemMessageType.kt @@ -29,7 +29,8 @@ enum class SystemMessageType(private val key: String, private val typeUrl: Strin DKE_FEED_CONFIRM("dke:feed_confirm", FeedRequests.MessageConfirm.getDescriptor().fullName), DKE_FEED_DELETE("dke:feed_delete", FeedRequests.MessageDelete.getDescriptor().fullName), DKE_FEED_MESSAGE_QUERY("dke:feed_message_query", FeedRequests.MessageQuery.getDescriptor().fullName), - DKE_FEED_HEADER_QUERY("dke:feed_header_query", FeedRequests.MessageQuery.getDescriptor().fullName); + DKE_FEED_HEADER_QUERY("dke:feed_header_query", FeedRequests.MessageQuery.getDescriptor().fullName), + DKE_PING("dke:ping", ""); override fun getKey(): String { return key diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java index 04f00bd5..fe45d0aa 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java @@ -44,12 +44,12 @@ protected void waitForTheAgrirouterToProcessMultipleMessages() throws Interrupte new Application() { @Override public String getApplicationId() { - return "434989e2-b4be-4cfd-8e40-f5b89d83458d"; + return "8af89642-5e30-11ef-a95b-d2e1bbd0b244"; } @Override public String getCertificationVersionId() { - return "f491d487-f913-4732-8be4-c2eacff21816"; + return "96c2c3e8-5e30-11ef-a95b-d2e1bbd0b244"; } }; @@ -61,59 +61,58 @@ public String getCertificationVersionId() { @Override public String getApplicationId() { - return "905152eb-c526-47a3-b871-aa46d065bb4c"; + return "2bb59356-5e31-11ef-a95b-d2e1bbd0b244"; } @Override public String getCertificationVersionId() { - return "c8ee0fc3-056c-4d81-8eba-fb4f8208c827"; + return "4dc7a506-5e31-11ef-a95b-d2e1bbd0b244"; } @Override public String getPrivateKey() { return """ -----BEGIN PRIVATE KEY----- - MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDCiSNJmpAbrqF5 - wOe4kPtavH50Oxfjev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PTRNu9GrK2gwI6lvFYuW - WqUjT/SOjXdsXlJPrLn689KCOugG9xP17yetSpEWRh7Iz1bRItymKN6ysNrUMDWW - 3rvVmYvvbboz89InAxrdy+EJM7NgU56WosIZAVum6WMuDyXhvilEWPhLAoGALwnd - tPXhSEqr147J6befhvb4Bz3KGFrIpCMme7BfKyBkdK8LcbIgSq+0K9F8xbnqbssY - AxFPE7hUjGb/lMN//jwRYwFBvd+MXb8050GyAEeRjvV3UFsmvLjDOOzAOpBxkiUV - Bw8ZNpbfTj7FbKGxjyVjHZBjGj1vgsOr6+rdZmECgYEA5gBLtqvsebobo86J4LL7 - 6VaXtgbgShm8GYMfTDPxkmAv4a89Lpec2UQ6EaVt7xHSdk4hMidfZHGambOtd+Zh - DTWnVSzxt91ZSEcDc3gTxK3hBltTga+9Y63S+/6vVykWKRtAvqkiEEgLNnNXOFNX - lE8ylEsO1whZyzKceV8uaqA= - -----END PRIVATE KEY----- - """; + MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDRFJg/FMUntssw + Zy2/7KM3PM09DPbt7T4MFFM7/A6oUQPePm4EbBU2i2U7LRlVosE93F0zqo/ie7xt + yjkUmZZcaYP4+kRbzEJ2kANlZ44W0b0SRLx5VQ3aaQh7klo7VV/+NNToZ0p5Z+L7 + kBiOlgLPlCmZMloa0bStQPiOzmKgiyPhJp326hQUJ6Cl9oExhT/w+oFjygrrXE4c + B27kD4tve3Ai8X9ZfV1fMihexpCcvwowHN3MB376bkI++CxK8P+WI4MS46qMSsY2 + X4i/hGVevUF7tcykeYDFiVjaSDcWtBReG536gmB86Imhu+kCZPxz67hk6+z/EFKA + d0OQqGOBAgMBAAECggEAHlycQ0TT4JGF7jB9j0pg5UuaDkyMqz5xbTWiZKqUwlKJ + ekOcnF3JstMJT0+cRzhMUZxnmHIjVONdGKBuK5SmJiNYe9Z0CNSfrjH5nEcudhfd + GgMLT59PVLE9/xvgqI8cUoD/jgQ552lzp85kEoisPdKpO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ax0wcTI + wy+YtX0o2eOcr4QVO+M/kOI= + -----END PRIVATE KEY----- """; } @Override public String getPublicKey() { return """ -----BEGIN PUBLIC KEY----- - MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwokjSZqQG66hecDnuJD7 - Wrx+dDsX43r2Y4BYaBv5Tvp5Cc9+uuueaYyqpMJpcRdxoaFzKaQEdivg4cd4OOnS - RgP3RuSbuU6S5z59wLJByTHGoBhPtC29vaV1F+2QHTtDK6iFUofVGd49r/jJReBj - sFJDiz7vCILSitd75U7t6mCphc0rLPTN6/7e4WXphshlKvxlWfML2FhU3EnQYTmQ - cxg6UJkSoi+cHBdR8mX5k/JsGzyE83/T3fvXA70E++DoZrvdtMMEGr0vp4T2jhRF - vYqPYCLCmN8vNULeDkfsUNtAXZrEbHFsFmkqEKY6JdPn9zp0xZizBr47sMvJHi6f - swIDAQAB + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0RSYPxTFJ7bLMGctv+yj + NzzNPQz27e0+DBRTO/wOqFED3j5uBGwVNotlOy0ZVaLBPdxdM6qP4nu8bco5FJmW + XGmD+PpEW8xCdpADZWeOFtG9EkS8eVUN2mkIe5JaO1Vf/jTU6GdKeWfi+5AYjpYC + z5QpmTJaGtG0rUD4js5ioIsj4Sad9uoUFCegpfaBMYU/8PqBY8oK61xOHAdu5A+L + b3twIvF/WX1dXzIoXsaQnL8KMBzdzAd++m5CPvgsSvD/liODEuOqjErGNl+Iv4Rl + Xr1Be7XMpHmAxYlY2kg3FrQUXhud+oJgfOiJobvpAmT8c+u4ZOvs/xBSgHdDkKhj + gQIDAQAB -----END PUBLIC KEY----- """; } @@ -127,45 +126,45 @@ public String getPublicKey() { @Override public String getApplicationId() { - return "3c3559c9-7062-4628-a4f7-c9f5aa07265f"; + return "e051056d-5e31-11ef-a95b-d2e1bbd0b244"; } @Override public String getCertificationVersionId() { - return "5e488554-d6bb-400c-9632-b3b4b35b07ca"; + return "e743930a-5e31-11ef-a95b-d2e1bbd0b244"; } @Override public String getPrivateKey() { return """ - -----BEGIN PRIVATE KEY----- - MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCkAWrcN0FmbWZ+ - 24qE6maNlf46EjH/BOI5f79wFRJAeG6RXrl8KwWdlfeZOlEYRyq+o4AVuP7Mce6R - x5PR/AEtn1K4Twr5h1+uG+O5/D2jJ0O/+nFnNcX/WgJfEbriDK9ewV8mEnFgG3n5 - y6P9RCcu0zMFV9PrKTop419krg2Ij0/to5LLU0DaQXmgvSC7Crx0k9dIhDeZ4jc3 - rv4SWzOcZT5vPFtA/5G66ZeeTVX+3iJbasWOdatMc7/cGYxUlnzeNSoCAqmyuHzO - PKHWcjyVwPXWG64TSzkb+QypynUIZaAy+P8uawD0BivsmFSf0k4pGl8wSHhE2pN8 - OIIyud/lAgMBAAECgf93UZCtJoYuPumS4aaljOOPntCW7yXwo1zy+D4PDUV6IiRP - HttTuvka7UB1+jeFskEm8Uz+gNjfZQRsiwbAftdcmc1Uyizx3ct+oEvNw/YT/T0N - LufSbwzd+l4/TGbqjtAH4CeZS1Gw2kyjr8RfPnZDWuSDvqIvNI9cak+8r+SotHEL - i1yAZTDvZAqLhbDLbW9Ephxd5QkKfwegybSwxJJcOw+KLPsq0Ibb2YGbkPTL1P6o - Ul3/tiyzEMRc2ufyDJgYCAUmvVBjkbHT7hQNkTL8EPAEXfL+vhte8A98aFPnWMhS - yiJo3T643fjZ8fzPcv8GWmT+z6IxtlXguC/OmQECgYEAzUbQF5YqJ61n6sQiJ0VQ - ZMDDVHzf/oNUCPee4tCVS0ShQ2JURUIbss+lUWbKDfFTXW9mte4VRk+WUh2gQqm6 - 49IdIpRGx6m6/ye2g6EmXRzeSN9GJu/wltS2uQ+8fmOkWiBUFg8bkLWTTxAY1w0n - 31AYcE8wwLb2FXt6Q2u4OQECgYEAzIfrUejd7GS/eaUx2GFKsXaI3B3CmLQ8TQFu - JOh3i2NgcDK5Uwhy5TWozEn4BpwX8UOMciZIGjMr0i5TzpSVca1sv1wyIyWr7+AU - 2dmxPTXbkQQpEy7GDE1iCMvsi1lC6F+EUwdCKw6H5oa0oU1XMr/JWJSGh8iFRH5v - H3ic4uUCgYEAycZYV0boqtWddrtRou5UBqUfmxWgC4nFeYcE64gBp9mO9jBaCzXf - ChVnN6tk4u2adxZAjIW47cLfTFoIpF438SYgM1QyeqIQyCueEKa/kfkFWfX1++IP - yALQlPmt20JQU7LBVGmHO+fvI2D8Oa6ZybzuOL7ueg+dtiIIXOsuSwECgYEAjqaZ - 1PYymmamOWSjQESTQPTofYVwLOtAR4Eg3jMY9anpIDfwk94HrJ/hTCKnD40dEdPI - B/F1Rni8LorLPwDYvoFzoH/gJC1pHxPN1yeC+6stqZYaQ9vSm8/4+SOppoMqLEI6 - W2JrnvYyiPEY2IvFroqfFt34eom7kUsRnASWf5UCgYEAxEMOQ0/+hz1APqCGVo3t - uePUIdsokCusRpWsxUdwHBGqfDjULqVmDXIJuJekV4YUxzyzktRzVms0pgFbr47L - f8IeyJnYFhPn1hgthGlgV7JvFq2TU+EgZYVpVGL6jrw8t78Y4IresceIkz4q/bGV - j35jwp22eLOc0FdPo0KgO4s= - -----END PRIVATE KEY----- + -----BEGIN PRIVATE KEY----- + MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQD38PmCfYHaoPRF + J47yIxCVmGAg94mnSV5C4XGSOXq1ha/GCjhsR+YDgKnBt+lenxGt4TExN1OOK/SS + uconfh61o1ouUPbaq3OImlSecYGIFzOQxWj9q97Yp+SNek9GDKj8VgUK33atL82W + YbY3QO/clh41zHDJ8fMObZ+2setfdYaQkxOFxqVLBu5TDg7CTOFfgdFXdgX7e2Qu + C4p8YiTYO73YoqX/Rcnsc6tNbWA5lwqSDoaVXn3BHcjN9VDPMjDSWyJKq9cCVDus + Xs4uB5Nqv1MFiZoZQHz8Cvva8JbXVmET3sbPl12RCLflYi21q9NvUgUI36rP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/fQzkRDoebtROowKBgDYH0nUzMXj+1q7ZEojk + DEPfY22pcH6pNrg3RkCi19BVRyUtk/CAJiSNud/wR61Kbq1wFQkqn8dU0ydbsqiX + Tz0LofvoLK3cZc6IhmdgOiOs75LIoMOfxskGpFdiNxGId8EIXACAwomm2S4o8KfI + fagxljG8Ic5oHxnVengksyd5 + -----END PRIVATE KEY----- """; } @@ -173,13 +172,13 @@ public String getPrivateKey() { public String getPublicKey() { return """ -----BEGIN PUBLIC KEY----- - MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApAFq3DdBZm1mftuKhOpm - jZX+OhIx/wTiOX+/cBUSQHhukV65fCsFnZX3mTpRGEcqvqOAFbj+zHHukceT0fwB - LZ9SuE8K+Ydfrhvjufw9oydDv/pxZzXF/1oCXxG64gyvXsFfJhJxYBt5+cuj/UQn - LtMzBVfT6yk6KeNfZK4NiI9P7aOSy1NA2kF5oL0guwq8dJPXSIQ3meI3N67+Elsz - nGU+bzxbQP+RuumXnk1V/t4iW2rFjnWrTHO/3BmMVJZ83jUqAgKpsrh8zjyh1nI8 - lcD11huuE0s5G/kMqcp1CGWgMvj/LmsA9AYr7JhUn9JOKRpfMEh4RNqTfDiCMrnf - 5QIDAQAB + MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9/D5gn2B2qD0RSeO8iMQ + lZhgIPeJp0leQuFxkjl6tYWvxgo4bEfmA4CpwbfpXp8RreExMTdTjiv0krnKJ34e + taNaLlD22qtziJpUnnGBiBczkMVo/ave2KfkjXpPRgyo/FYFCt92rS/NlmG2N0Dv + 3JYeNcxwyfHzDm2ftrHrX3WGkJMThcalSwbuUw4OwkzhX4HRV3YF+3tkLguKfGIk + 2Du92KKl/0XJ7HOrTW1gOZcKkg6GlV59wR3IzfVQzzIw0lsiSqvXAlQ7rF7OLgeT + ar9TBYmaGUB8/Ar72vCW11ZhE97Gz5ddkQi35WIttavTb1IFCN+qz0spDm08LtHb + oQIDAQAB -----END PUBLIC KEY----- """; } diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java index d6c92be1..6b749fd5 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java @@ -53,7 +53,8 @@ public enum Identifier { TELEMETRY_PLATFORM("telemetry-platform"), TELEMETRY_PLATFORM_REMOVED("telemetry-platform-removed"), TELEMETRY_PLATFORM_DEACTIVATED("telemetry-platform-deactivated"), - COMMUNICATION_UNIT("communication-unit"); + COMMUNICATION_UNIT("communication-unit"), + MQTT_COMMUNICATION_UNIT("communication-unit"); private final String fileName; diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java new file mode 100644 index 00000000..908a5a67 --- /dev/null +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java @@ -0,0 +1,83 @@ +package com.dke.data.agrirouter.test.fixture; + +import agrirouter.request.payload.endpoint.Capabilities; +import com.dke.data.agrirouter.api.cancellation.DefaultCancellationToken; +import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse; +import com.dke.data.agrirouter.api.enums.ApplicationType; +import com.dke.data.agrirouter.api.enums.CertificationType; +import com.dke.data.agrirouter.api.enums.ContentMessageType; +import com.dke.data.agrirouter.api.enums.Gateway; +import com.dke.data.agrirouter.api.env.QA; +import com.dke.data.agrirouter.api.service.onboard.OnboardingService; +import com.dke.data.agrirouter.api.service.parameters.OnboardingParameters; +import com.dke.data.agrirouter.api.service.parameters.SetCapabilitiesParameters; +import com.dke.data.agrirouter.impl.messaging.rest.FetchMessageServiceImpl; +import com.dke.data.agrirouter.impl.messaging.rest.SetCapabilityServiceImpl; +import com.dke.data.agrirouter.impl.onboard.OnboardingServiceImpl; +import com.dke.data.agrirouter.test.AbstractIntegrationTest; +import com.dke.data.agrirouter.test.OnboardingResponseRepository; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +import java.io.IOException; +import java.util.Collections; +import java.util.UUID; + +import static org.junit.jupiter.api.Assertions.assertNotNull; + +/** + * Class to onboard endpoints for different reasons. + */ +@SuppressWarnings("ALL") +class MqttCommunicationUnitFixture extends AbstractIntegrationTest { + + /** + * Create a new registration token by using the agrirouter UI and select the integration test + * application for CUs. + */ + @Test + @Disabled("Please replace the placeholder for the registration code to run the test case.") + void onboardCommunicationUnitAndSaveToFile() throws IOException { + OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { + }); + OnboardingParameters onboardingParameters = new OnboardingParameters(); + onboardingParameters.setRegistrationCode("f50319dc13"); + onboardingParameters.setApplicationId(communicationUnit.getApplicationId()); + onboardingParameters.setCertificationVersionId(communicationUnit.getCertificationVersionId()); + onboardingParameters.setCertificationType(CertificationType.P12); + onboardingParameters.setGatewayId(Gateway.REST.getKey()); + onboardingParameters.setApplicationType(ApplicationType.APPLICATION); + onboardingParameters.setUuid(UUID.randomUUID().toString()); + final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); + assertNotNull(onboardingResponse); + assertNotNull(onboardingResponse.getCapabilityAlternateId()); + assertNotNull(onboardingResponse.getDeviceAlternateId()); + assertNotNull(onboardingResponse.getSensorAlternateId()); + assertNotNull(onboardingResponse.getAuthentication()); + assertNotNull(onboardingResponse.getAuthentication().getCertificate()); + assertNotNull(onboardingResponse.getAuthentication().getSecret()); + assertNotNull(onboardingResponse.getAuthentication().getType()); + assertNotNull(onboardingResponse.getConnectionCriteria()); + assertNotNull(onboardingResponse.getConnectionCriteria().getMeasures()); + assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); + OnboardingResponseRepository.save( + OnboardingResponseRepository.Identifier.MQTT_COMMUNICATION_UNIT, onboardingResponse); + final SetCapabilityServiceImpl setCapabilityService = new SetCapabilityServiceImpl(); + final SetCapabilitiesParameters setCapabilitiesParameters = new SetCapabilitiesParameters(); + setCapabilitiesParameters.setApplicationId(communicationUnit.getApplicationId()); + setCapabilitiesParameters.setCertificationVersionId( + communicationUnit.getCertificationVersionId()); + setCapabilitiesParameters.setOnboardingResponse(onboardingResponse); + final SetCapabilitiesParameters.CapabilityParameters capabilityParameters = + new SetCapabilitiesParameters.CapabilityParameters(); + capabilityParameters.setDirection(Capabilities.CapabilitySpecification.Direction.SEND_RECEIVE); + capabilityParameters.setTechnicalMessageType(ContentMessageType.ISO_11783_TASKDATA_ZIP); + setCapabilitiesParameters.setCapabilitiesParameters( + Collections.singletonList(capabilityParameters)); + setCapabilityService.send(setCapabilitiesParameters); + final FetchMessageServiceImpl fetchMessageService = new FetchMessageServiceImpl(); + fetchMessageService.fetch( + onboardingResponse, + new DefaultCancellationToken(MAX_TRIES_BEFORE_FAILURE, DEFAULT_INTERVAL)); + } +} From 8d2c786531b142659ed1777485d9e9850a23857c Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Mon, 19 Aug 2024 15:54:43 +0200 Subject: [PATCH 03/16] Add Ping Service implementation Introduced PingService interface and its implementation, PingServiceImpl, to handle the pinging of health interfaces using MQTT protocol. Created PingParameters class for encapsulating ping request parameters and updated MessageEncoder to support encoding of ping messages. Also added a PingServiceTest class to validate the sending of health messages. --- .../service/messaging/mqtt/PingService.java | 9 +++ .../api/service/parameters/PingParameters.kt | 18 ++++++ .../impl/messaging/MessageEncoder.java | 36 +++++++++++ .../impl/messaging/mqtt/PingServiceImpl.java | 64 +++++++++++++++++++ .../test/messaging/mqtt/PingServiceTest.java | 13 ++++ 5 files changed, 140 insertions(+) create mode 100644 agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/service/messaging/mqtt/PingService.java create mode 100644 agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/service/parameters/PingParameters.kt create mode 100644 agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java create mode 100644 agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java diff --git a/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/service/messaging/mqtt/PingService.java b/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/service/messaging/mqtt/PingService.java new file mode 100644 index 00000000..3974e33d --- /dev/null +++ b/agrirouter-sdk-java-api/src/main/java/com/dke/data/agrirouter/api/service/messaging/mqtt/PingService.java @@ -0,0 +1,9 @@ +package com.dke.data.agrirouter.api.service.messaging.mqtt; + +import com.dke.data.agrirouter.api.service.parameters.PingParameters; + +/** + * Service interface for pinging the health interface. + */ +public interface PingService extends MessagingService { +} diff --git a/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/service/parameters/PingParameters.kt b/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/service/parameters/PingParameters.kt new file mode 100644 index 00000000..385f7bda --- /dev/null +++ b/agrirouter-sdk-java-api/src/main/kotlin/com/dke/data/agrirouter/api/service/parameters/PingParameters.kt @@ -0,0 +1,18 @@ +package com.dke.data.agrirouter.api.service.parameters + +import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse +import com.dke.data.agrirouter.api.service.ParameterValidation +import com.dke.data.agrirouter.api.service.parameters.base.AbstractParameterBase + +/** + * Parameters class. Encapsulation for the services. + */ +class PingParameters : AbstractParameterBase(), ParameterValidation { + + var onboardingResponse: OnboardingResponse? = null + + override fun technicalValidation() { + nullCheck("onboardingResponse", onboardingResponse) + } + +} \ No newline at end of file diff --git a/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/MessageEncoder.java b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/MessageEncoder.java index ed034713..558a52dd 100644 --- a/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/MessageEncoder.java +++ b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/MessageEncoder.java @@ -16,6 +16,7 @@ import com.dke.data.agrirouter.api.service.parameters.*; import com.dke.data.agrirouter.api.util.TimestampUtil; import com.dke.data.agrirouter.impl.common.MessageIdService; +import com.google.protobuf.ByteString; import java.util.Objects; @@ -450,10 +451,45 @@ default EncodedMessage encode(CloudOffboardingParameters parameters) { return new EncodedMessage(applicationMessageID, encodedMessage); } + /** + * Encode a message to send a message. + * + * @param parameters - + * @return - + */ + default EncodedMessage encode(PingParameters parameters) { + final var applicationMessageID = + parameters.getApplicationMessageId() == null + ? MessageIdService.generateMessageId() + : parameters.getApplicationMessageId(); + + var messageContent = ""; // No content for ping messages. + + var messageHeaderParameters = new MessageHeaderParameters(); + messageHeaderParameters.setApplicationMessageId(applicationMessageID); + messageHeaderParameters.setTechnicalMessageType(SystemMessageType.DKE_PING); + messageHeaderParameters.setMode(Request.RequestEnvelope.Mode.DIRECT); + messageHeaderParameters.setMetadata(MessageOuterClass.Metadata.newBuilder().build()); + + setSequenceNumber( + messageHeaderParameters, + parameters.getSequenceNumber(), + parameters.getOnboardingResponse()); + var payloadParameters = new PayloadParameters(); + payloadParameters.setTypeUrl(SystemMessageType.DKE_PING.getTypeUrl()); + + payloadParameters.setValue(ByteString.copyFrom(messageContent.getBytes())); + + var encodedMessage = + this.getEncodeMessageService().encode(messageHeaderParameters, payloadParameters); + return new EncodedMessage(applicationMessageID, encodedMessage); + } + /** * Get the service to encode messages. * * @return - */ EncodeMessageService getEncodeMessageService(); + } diff --git a/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java new file mode 100644 index 00000000..8377883f --- /dev/null +++ b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java @@ -0,0 +1,64 @@ +package com.dke.data.agrirouter.impl.messaging.mqtt; + +import com.dke.data.agrirouter.api.exception.CouldNotSendMqttMessageException; +import com.dke.data.agrirouter.api.messaging.MqttAsyncMessageSendingResult; +import com.dke.data.agrirouter.api.service.messaging.encoding.EncodeMessageService; +import com.dke.data.agrirouter.api.service.messaging.mqtt.PingService; +import com.dke.data.agrirouter.api.service.parameters.PingParameters; +import com.dke.data.agrirouter.api.service.parameters.SendMessageParameters; +import com.dke.data.agrirouter.impl.messaging.MessageBodyCreator; +import com.dke.data.agrirouter.impl.messaging.MessageEncoder; +import com.dke.data.agrirouter.impl.messaging.MqttService; +import com.dke.data.agrirouter.impl.messaging.encoding.EncodeMessageServiceImpl; +import org.eclipse.paho.client.mqttv3.IMqttClient; +import org.eclipse.paho.client.mqttv3.MqttException; +import org.eclipse.paho.client.mqttv3.MqttMessage; + +import java.util.Collections; +import java.util.Objects; + +/** + * Service implementation. + */ +public class PingServiceImpl extends MqttService + implements PingService, MessageBodyCreator, MessageEncoder { + + private final EncodeMessageService encodeMessageService; + + public PingServiceImpl(IMqttClient mqttClient) { + super(mqttClient); + this.encodeMessageService = new EncodeMessageServiceImpl(); + } + + @Override + public String send(PingParameters parameters) { + try { + var encodedMessage = this.encode(parameters); + var sendMessageParameters = new SendMessageParameters(); + sendMessageParameters.setOnboardingResponse(parameters.getOnboardingResponse()); + sendMessageParameters.setEncodedMessages( + Collections.singletonList(encodedMessage.getEncodedMessage())); + var messageAsJson = this.createMessageBody(sendMessageParameters); + var payload = messageAsJson.getBytes(); + this.getMqttClient() + .publish( + Objects.requireNonNull(parameters.getOnboardingResponse()) + .getConnectionCriteria() + .getMeasures(), + new MqttMessage(payload)); + return encodedMessage.getApplicationMessageID(); + } catch (MqttException e) { + throw new CouldNotSendMqttMessageException(e); + } + } + + @Override + public MqttAsyncMessageSendingResult sendAsync(PingParameters parameters) { + return null; + } + + @Override + public EncodeMessageService getEncodeMessageService() { + return encodeMessageService; + } +} diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java new file mode 100644 index 00000000..80de6a12 --- /dev/null +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -0,0 +1,13 @@ +package com.dke.data.agrirouter.test.messaging.mqtt; + +import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; +import com.dke.data.agrirouter.impl.messaging.mqtt.PingServiceImpl; +import org.junit.jupiter.api.Test; + +class PingServiceTest { + + @Test + void sendHealthMessageToPingEndpoint() { + } + +} From aa1f4a7a787a46e7b93f6d1ed2b090c7d4f1c514 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Mon, 19 Aug 2024 15:55:24 +0200 Subject: [PATCH 04/16] Correct formatting in AbstractIntegrationTest Fixed the indentation of the end-private-key line in AbstractIntegrationTest. Also removed unused import statements in PingServiceTest to clean up the code. --- .../com/dke/data/agrirouter/test/AbstractIntegrationTest.java | 3 ++- .../data/agrirouter/test/messaging/mqtt/PingServiceTest.java | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java index fe45d0aa..173d541c 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/AbstractIntegrationTest.java @@ -99,7 +99,8 @@ public String getPrivateKey() { BwPdbJx1m7V0dVHNJm6q+Ig7L3ovbJt88599T0Nf7WyEhbUaXVWKkH/OxCvesLX3 b0VMOte/UYuSoGiOuOmzFoQoR1IAjqlC0vHqfzMJRGvOT9k/ZHvI2HwlHax0wcTI wy+YtX0o2eOcr4QVO+M/kOI= - -----END PRIVATE KEY----- """; + -----END PRIVATE KEY----- + """; } @Override diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java index 80de6a12..2bab08e6 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -1,7 +1,5 @@ package com.dke.data.agrirouter.test.messaging.mqtt; -import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; -import com.dke.data.agrirouter.impl.messaging.mqtt.PingServiceImpl; import org.junit.jupiter.api.Test; class PingServiceTest { From 7c6168e391b31953d14ad719e6a848656377b477 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 08:52:11 +0200 Subject: [PATCH 05/16] Enable test and update registration code and onboarding response Re-enabled the `onboardCommunicationUnitAndSaveToFile` test and updated its registration code. Also updated the `communication-unit.json` with new device and authentication details. --- .../onboarding-responses/communication-unit.json | 2 +- .../agrirouter/test/fixture/CommunicationUnitFixture.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agrirouter-sdk-java-tests/onboarding-responses/communication-unit.json b/agrirouter-sdk-java-tests/onboarding-responses/communication-unit.json index 0f244781..0259bc54 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/communication-unit.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/communication-unit.json @@ -1 +1 @@ -{"deviceAlternateId":"cdee8e0c-05b8-4252-9da3-977239e54adc","capabilityAlternateId":"3035ec70-dca1-4d71-a000-e79eb5891f81","sensorAlternateId":"f658fa1a-fef3-43bc-87e7-4499858ac609","connectionCriteria":{"gatewayId":"3","measures":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/cdee8e0c-05b8-4252-9da3-977239e54adc","commands":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/cdee8e0c-05b8-4252-9da3-977239e54adc"},"authentication":{"type":"P12","secret":"FNG3X?X4gJwZlut!ebZ3rigVfQCyOrOqhCj7","certificate":"MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQI5/bn3aK74qcCAgfQBIIEyKlLZWlLkNBwPfT1j43J/uq1b/YrPNaA/eh60KWjPWx9lliS/zbJoarogWz36W58YgR//iJ4vnzTcgfpWa76UtJmyaXbOmCGeBz6dlNldoXyhlAqm2gFI66VmSQEdsthcTkywAvGZvo9Z72EvSzCkHarAzz1CL7dAumHwx9dCyU07tupDoevNUsSRu5nbFf8fDO4IxpJN3gNjBl7o9peQEaVnFpbi9JY3+ycoFweFg3SaUD+Sdfu0fXo3M/7a5Nehc7iNWvVMQSe9aK6q0Vh/1O3h9GZ0VSb0OkY6R+9/yqQs8cIYexoeCuIsF30SseQGTlLFH7htYRUnHsOUBY9x6tDFcrT1tVbiZogT8QKXj75g+ta0qfY1b/SEWmbuD3Wj7s06Ego8jdlXqfvyMlu41AZkjIqi3DaOtlJfmMok+f4X/VKCu51Vcf0GAJTc/BLROwZ83RrfUcXjaF1ARwmcOKpTWC5x7uPsGDKXw6RHQi+lkJon17/l5YEEbZ7w4CV5lK06jLJOyWcy+9OY3ptS4/DXXKFkQT9z2ZPtcOE7Kn71UoKrjbfmD5WXNriJGeZxogZfH4NiDZz0EhMZ2KRSOFxHneeetGsBZ9hWMNHyOge5NNb8G07EINNC7gY5mYKn7+IqJYg3Ul4dAaHrTyqhCqIXwvEurQfrmTMSpK5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WA0UBlfTu/OlUoZ52uuivoxclFRk2f1uJwv+dBk5ENooTBGtkrrj5GNLe6NIqiQgG9W9WxcTI5NqJW19VSUNpB+ErrnSRR0L/vqRuFR8C4rqD5+N+HWWZ56ZYcv+HLi3dRDZvcqe2/ugzfJaAGDIjT6iTuvvaDH6ihh3rO/YNQxsvqJ6DiFp+B0lVIytrO50YADjs2KemQQXgdPOKc3M6vcxwWjw80hLcKmioY69MoZ45ZLms9BG6eR7vG2HxvPUF9ZCvrEwxMS9zoil/WB7ra6dslVyJkihuPJlxu6AVC+gXiUCE5LBcVmrCjLdcLovcOA334F80K/3kilT5lonTpU/RaU2A2mNewRSy9iD5Lyt5sZDxwaZnFZ/bc/XcEgxF+ZThrEsONLM+oBiOy8OC7Fd2tkAXKcvzdOEV7xGN1CZhuVS4mRKEPnIYxmOH/dGLpDj3NJqEsSo9itz+s2CczakXhe6SEj5NUKV3KSvk0PJs8PXaB5Feyw6XN9rLobNBE/Rb58fXU9qoNpgFfjwHawghcpIDZ9BMGxGALhCA932g0ETk2gd62tzopjvDSgddJmjkccxzN5IoiOCpfdVS4ot5NZElahR9fmTuwJWUQA3yIMbMi25UwiS24g5IozOtbIn0ctRFDFTXEH49wiqlfcfrNFmmq9cwdItnwviEYjGCd4CipU9AJ6ABIDOhsKQ4B81g9nrodsRVnXNcUqSywmdlhaVCoKE8aOaV0LERxQ4/ZV0n1jQurjnuvJR341p1BGa2mGcZ/uCd1ZIi1bQSc7WKQpmMigtbS5RaUCz5Ff9AIpTnLhyEw4uZy0P39Lc7P490FSA11edT09hEHCo3S2HhJ3PSwtNKYJ21TH1CktYzATqoGZuxELDuuY+97gEU9ZaKPcnRUSfFRHgAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQU4HIzO4K0G2JETlax4nm23MmKH0UECFLun0BpI/44AgIH0AAA"}} \ No newline at end of file +{"deviceAlternateId":"5dade5c9-dcca-4bf1-be22-f7f61ed90ea7","capabilityAlternateId":"5dade5c9-dcca-4bf1-be22-f7f61ed90ea7","sensorAlternateId":"5dade5c9-dcca-4bf1-be22-f7f61ed90ea7","connectionCriteria":{"gatewayId":"3","measures":"https://gateway-service.qa.agrirouter.farm/inbox/5dade5c9-dcca-4bf1-be22-f7f61ed90ea7","commands":"https://gateway-service.qa.agrirouter.farm/outbox/5dade5c9-dcca-4bf1-be22-f7f61ed90ea7"},"authentication":{"type":"P12","secret":"Ga4OM1C4tgWGILrF","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIKML/zSVPam0CAggAgIIFqBhjobX7bxXWGRQEc3bflue2rYelXj7LVzFAAzg+z1BvbbEBeEtreztRf4qXPL2yIZNtMGXshlPPHrb8WA9mCh7qJUO+3n5PBYZR4ohBJeaLY5X51Z5xoUuMBckQMtK3YaQjpnfQafRMZk5urLv3G6L1PcPGIwvz1q7SKmF8KY7Wix1RI8z/0EaBza8HJnLWlnn18XhusZRGhgZH0VXiSjVWWnmMdk3py2cZx5Hl7rZJwN86rlV/mhx2wLfIlmZ6YMtgYv4QF0PCxsNH8FcxYpE6OuqjgN0m5RqL3bDw1iWPfg5lpeS+TQcKhod+kH6f4p7YpPTorEfAOk8GjZAd30aeTVvdH4iO8JZ8z9U8bPEijJuA+gN+/tIQpbU3IqYk/5NfrWj/fwwLqvvKsvJPjHBmtretK8r/YsAmpdeLPu5He3LhlEnBbFhf9tKRU5BnWv+4pQc7n0NK3oNEITjz1F0tDpHTNbcHhviFhUyIHer2JQQAuJMoFg6p32fcnNTRqIdXQo0Qyq2ge3AD3MIuUkkiSTtgQqybNjtKl401oa3ioUI1855fSnqoTFrSGpUYGPpNZOYcmAf9GRoGPfwlKFPsYFiqSM4sgemNyv5jR7Ra0mg1ZJWxh284swtGYQCAbaBf6WSLUuzlZ4bV4Dsg/AArVQzCN8qq2w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TrV/3ijXOeqB7Ar0s0iH/u4y8JlsuUndYPjXnK7+IHZ/Ipol69CVot2po4Ya9IkZebz2490PjvkKif+7j25adAEssJR7E58P6uw0fkpduj1R+UtxTemQuc2aaUNzbKFQgkzQoOpqggGHyCfwvOZWaa1C1vx6Lh78fK75PmR6SUu1Ow7bw7O8fHsFG1Y5R8P1sl375E4tkd8a59FmY3MAKbRAnkXTL2WG9pRaqkuF8SXXuLD2uqktLpSnE8o5X2qPHO0m+2eRMFN9+XHnUUx9s7NDmMVngF1cGZDTw8lxq8Ut8GbGrnECA/GCJD1gzs1eHrWnpBgE9lJthkVfXtlZyt9ak0VrYSs1P8SVD3x5II3CWcGsAGI2m90zk7CxKQi8KjbRq+EkC00ETQv3vRp84mp9mHWS/KyXPrQzQH6gRzsgPdXsbXVWLQjNHUqoTaeYAqsfzqZJIPx7fu5fYr9jCzMUjoQcplP4cweGvfjZ+2DwAkad3IYxJTAjBgkqhkiG9w0BCRUxFgQUKU26wdSYHSKOFqERtv10UTBNj/swKzAfMAcGBSsOAwIaBBRxI9cfwRTRQEUbMwLWYObIZs7/RAQI2qFX7NvrX8c\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java index 39492310..79fba002 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java @@ -36,12 +36,12 @@ class CommunicationUnitFixture extends AbstractIntegrationTest { * application for CUs. */ @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") + //@Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardCommunicationUnitAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); OnboardingParameters onboardingParameters = new OnboardingParameters(); - onboardingParameters.setRegistrationCode("f50319dc13"); + onboardingParameters.setRegistrationCode("8908462691"); onboardingParameters.setApplicationId(communicationUnit.getApplicationId()); onboardingParameters.setCertificationVersionId(communicationUnit.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); From 02118bcd5321f53775fc1b68218959a3caf89a46 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 08:52:45 +0200 Subject: [PATCH 06/16] Update farming software JSON and adjust onboarding test Updated the `farming-software.json` with new device identifiers, connection criteria, and authentication details. Also, modified the test fixture to enable the onboarding test and updated the registration code accordingly. --- .../onboarding-responses/farming-software.json | 2 +- .../data/agrirouter/test/fixture/FarmingSoftwareFixture.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/agrirouter-sdk-java-tests/onboarding-responses/farming-software.json b/agrirouter-sdk-java-tests/onboarding-responses/farming-software.json index 30653616..e1556b7e 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/farming-software.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/farming-software.json @@ -1 +1 @@ -{"deviceAlternateId":"93e12d85-5cb1-4afc-aa53-db2fd9472437","capabilityAlternateId":"3035ec70-dca1-4d71-a000-e79eb5891f81","sensorAlternateId":"b617b956-4145-43db-916b-fada868cb389","connectionCriteria":{"gatewayId":"3","measures":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/93e12d85-5cb1-4afc-aa53-db2fd9472437","commands":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/93e12d85-5cb1-4afc-aa53-db2fd9472437"},"authentication":{"type":"P12","secret":"pT#uh2yNg#0iQqnC24c5cII5YWmJDc1hqTz5","certificate":"MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQI+vi4nSt9UHQ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QWV/5YhaHX6Efv01vDqkWv1Lnqagy3+fHEKHQEz2NiFxHBdSN4kgzmp4nYaOdlS/f7WqdEm+Vr6w9gtOV4htmCuyZBG4t2Y5NY2VOpKNI1a60zbu+HS1ooGIkWo0F/JNJgTG2o+/b24odZsrsxV7YlfpXW4xSLpO4xlTcUxDF/hk6fUhfknVE3nftA8M9eG9F6LnPTG+f2YNBsQrJNCf/sw9IF/MtTE0GCsC2BYQFA7mTyzhLexCBuJ4GBtoK85F3SDKMKTVux6PENmhcnrYxSZU57pw/eoKHzbWjlERgNAGDzaygnMwBc3eEhJ0iDGXxMuZD8cxGp86ezumrc/yu7a/Ijis4qT07YDIalOggTOWSC2P6raePyonB23JflE56bvV4aFUU22A1drgPgKQDcOyUOFl0ZFeKyI4YXxlvofE96knASvFMRLgaGNv+DsKsTprH9Sp5fDFta5BFTyffaLAICtGk4s9IrPA/LiGx2w/RtRg9oI1d85VYNVANVxb9o2RgAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQUubDjZkkLCdTZIIuMHUYuqaJuMckECHWppsOvamOvAgIH0AAA"}} \ No newline at end of file +{"deviceAlternateId":"4e533dfc-89e3-4efd-a786-bec3612f9b96","capabilityAlternateId":"4e533dfc-89e3-4efd-a786-bec3612f9b96","sensorAlternateId":"4e533dfc-89e3-4efd-a786-bec3612f9b96","connectionCriteria":{"gatewayId":"3","measures":"https://gateway-service.qa.agrirouter.farm/inbox/4e533dfc-89e3-4efd-a786-bec3612f9b96","commands":"https://gateway-service.qa.agrirouter.farm/outbox/4e533dfc-89e3-4efd-a786-bec3612f9b96"},"authentication":{"type":"P12","secret":"9iPnjUlRZ8EXqAlW","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEzcZdHPUN+oCAggAgIIFqJ+zzYxdv90qPf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Dry2+QzMiAvpY9ak3Gk9Leti/vga0KPtuUDlpZsh2YmkNUgK2vfQ0HutOZHcr/M46Y08WCEJWdihX0Ru+BxoYpV1ERMT4aSL2AHnRuLnyjmhGxq9W+QjEo4UHynNYO7e9JCgYNGPkAFLDAronBpS9ytKF3jBxOagxJTAjBgkqhkiG9w0BCRUxFgQUvVKQX6kRi4PKMVQ0FJmQlOXjDZowKzAfMAcGBSsOAwIaBBQ5bEHWvZxP6M36J14XDDig4/y96gQI7gytJZtZxtU\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java index fd975c42..94098250 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java @@ -33,12 +33,12 @@ class FarmingSoftwareFixture extends AbstractIntegrationTest { *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/905152eb-c526-47a3-b871-aa46d065bb4c/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= */ @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") + //@Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardFarmingSoftwareAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("6a049384e3"); + onboardingParameters.setRegistrationCode("2067663604"); onboardingParameters.setApplicationId(farmingSoftware.getApplicationId()); onboardingParameters.setCertificationVersionId(farmingSoftware.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); From 98d2bead0f37229f8106b04452ed48de2b2dfdd2 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 08:54:39 +0200 Subject: [PATCH 07/16] Add new onboarding response JSON and update test classes Added a new `mqtt-communication-unit.json` file for onboarding responses. Corrected the file name reference in `OnboardingResponseRepository` and updated the registration code in the `MqttCommunicationUnitFixture` test case, while also re-enabling the previously disabled test. --- .../onboarding-responses/mqtt-communication-unit.json | 1 + .../data/agrirouter/test/OnboardingResponseRepository.java | 2 +- .../agrirouter/test/fixture/MqttCommunicationUnitFixture.java | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json diff --git a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json new file mode 100644 index 00000000..f9d38153 --- /dev/null +++ b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json @@ -0,0 +1 @@ +{"deviceAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","capabilityAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","sensorAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","connectionCriteria":{"gatewayId":"3","measures":"https://gateway-service.qa.agrirouter.farm/inbox/235e74ce-f533-43b3-86ec-462a712a666f","commands":"https://gateway-service.qa.agrirouter.farm/outbox/235e74ce-f533-43b3-86ec-462a712a666f"},"authentication":{"type":"P12","secret":"h0sFbZ9brOTslVdP","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIxlfXLEPabZMCAggAgIIFqHcc1lLHw7chOg8qK52SJoMEWKMIKuXWy227paYNbOoy4hgY4A0OuObXRdfSf6MgoIjH8TwfQMEqi5snJ1x7LQkkrFk2E/N92wPpB91MHHpE1Ju3fOCzd/oXjD2N1PyGMzUSAJo2yRzOBSgXP4WES/mr1X+m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RUxFgQUCRsKQQ9H9SpmZXW/+Ntni4bRqfIwKzAfMAcGBSsOAwIaBBRx131ysbfPd79mLI6tAd64VqplGgQIKiYSyjWh/C0\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java index 6b749fd5..00fc6885 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java @@ -54,7 +54,7 @@ public enum Identifier { TELEMETRY_PLATFORM_REMOVED("telemetry-platform-removed"), TELEMETRY_PLATFORM_DEACTIVATED("telemetry-platform-deactivated"), COMMUNICATION_UNIT("communication-unit"), - MQTT_COMMUNICATION_UNIT("communication-unit"); + MQTT_COMMUNICATION_UNIT("mqtt-communication-unit"); private final String fileName; diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java index 908a5a67..a0e5faa3 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java @@ -36,12 +36,12 @@ class MqttCommunicationUnitFixture extends AbstractIntegrationTest { * application for CUs. */ @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") + //@Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardCommunicationUnitAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); OnboardingParameters onboardingParameters = new OnboardingParameters(); - onboardingParameters.setRegistrationCode("f50319dc13"); + onboardingParameters.setRegistrationCode("0639546829"); onboardingParameters.setApplicationId(communicationUnit.getApplicationId()); onboardingParameters.setCertificationVersionId(communicationUnit.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); From ca9bea0ce12aca192dd9e9cfb12d08507f9a6826 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 08:56:03 +0200 Subject: [PATCH 08/16] Update telemetry platform onboarding response and test fixture Replaced telemetry platform onboarding details with new identifiers and updated the registration code in the test fixture. Also, enabled the previously disabled test for onboarding. --- .../onboarding-responses/telemetry-platform.json | 16 +--------------- .../test/fixture/TelemetryPlatformFixture.java | 4 ++-- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform.json b/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform.json index 78066eb8..e49b32c3 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform.json @@ -1,15 +1 @@ -{ - "deviceAlternateId": "a783ce19-79c6-4e50-9a9a-4f54e376844b", - "capabilityAlternateId": "3035ec70-dca1-4d71-a000-e79eb5891f81", - "sensorAlternateId": "2a7828f4-7ad2-40df-a942-274b7a96c508", - "connectionCriteria": { - "gatewayId": "3", - "measures": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/a783ce19-79c6-4e50-9a9a-4f54e376844b", - "commands": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/a783ce19-79c6-4e50-9a9a-4f54e376844b" - }, - "authentication": { - "type": "P12", - "secret": "DyPedBmnf!#DtierUhCwAX43JbWsbnKWD26M", - "certificate": "MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQI4locMobm5RQCAgfQBIIEyN9t2JuMREhsakYC8FDXjBr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n9b2JHDb+MB3TajsprYZdJJnxtq8M0RNhZz8zvxZDW93ttULi7joYBuT+l/ZVw0Ny5igfJCrXVF+dYzZgVGPZ+eJH1haTbqD2+0Vdzl05YmP20kG4QpqqGmiZaMott+0dLp0vAciK2F5+EX1VgbG9jnUTIQl4yX9vDovfdx4deuIS8AvvMpxSfpszno9emEMEx0Ns1+6T3Eqa5lu7EithwazIDBqPeNhof7J5LHty9fcEUHf0fD32JMDewGGl6uQm/eflTJ3gMjuWsMAsAGP/dYdGiVfPinSCyQj9hTtFM8W5NZe+t0ixr447enNDslCoAcaUYU9tfaRDdnE9bdPeasjL8v4p9plqyT6Rr/jSL1eWWxF2rpVH8fXz/er0lcMo2hBTa/1PIUUNZcnaFqOulMgqY/MzeD2RK1B1f+79lc1eO169wybzeZ2/isYQkFAYcmawhtlyqNH15r5c0foSwtiUF8zE8QOiZyxKSf9pVcK1VqWSNgFVtqcG1HlTiBVQWjOkTEJifcAAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQUH6B0AkfyOvF2uV8fGQ+JWvrQfmwECFzlcHn5c9pUAgIH0AAA" - } -} \ No newline at end of file +{"deviceAlternateId":"a55f9e96-86bb-4246-be3c-f3f9eb7a08ce","capabilityAlternateId":"a55f9e96-86bb-4246-be3c-f3f9eb7a08ce","sensorAlternateId":"a55f9e96-86bb-4246-be3c-f3f9eb7a08ce","connectionCriteria":{"gatewayId":"3","measures":"https://gateway-service.qa.agrirouter.farm/inbox/a55f9e96-86bb-4246-be3c-f3f9eb7a08ce","commands":"https://gateway-service.qa.agrirouter.farm/outbox/a55f9e96-86bb-4246-be3c-f3f9eb7a08ce"},"authentication":{"type":"P12","secret":"xA35MNgYumGgyIHg","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIBnQS7m+UZf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Fv/yPiaKMObiN89pvplaPsTeekPHdF2CigAYcvZ95B9xXbj6RZHySQfXSFeNl7rasDRfUfXKdCxc20SpcN5Pzb3SWpTqHj3NOrco4KjTxzIEGAxqd5x6LfDskxJTAjBgkqhkiG9w0BCRUxFgQUL8quF0Hbjeu9iudOrCLF9/6LxhwwKzAfMAcGBSsOAwIaBBRzo2I2ep3TsVXsc432jjmonofklAQI0mVdGhrujIY\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java index bb3b46b0..02273658 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java @@ -29,12 +29,12 @@ class TelemetryPlatformFixture extends AbstractIntegrationTest { *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/3c3559c9-7062-4628-a4f7-c9f5aa07265f/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= */ @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") + //@Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardTelemetryPlatformAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("3e22929d3f"); + onboardingParameters.setRegistrationCode("8530975704"); onboardingParameters.setApplicationId(telemetryPlatform.getApplicationId()); onboardingParameters.setCertificationVersionId(telemetryPlatform.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); From b79165352ef1c8f71e71c9e02f7850d96d2fe811 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 09:40:14 +0200 Subject: [PATCH 09/16] Remove obsolete onboarding responses JSON files Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository. --- .../farming-software-deactivated.json | 1 - .../farming-software-removed.json | 1 - .../telemetry-platform-deactivated.json | 15 ---- .../telemetry-platform-removed.json | 15 ---- .../test/OnboardingResponseRepository.java | 4 -- .../fixture/CommunicationUnitFixture.java | 2 +- .../test/fixture/FarmingSoftwareFixture.java | 71 +------------------ .../fixture/MqttCommunicationUnitFixture.java | 2 +- .../fixture/TelemetryPlatformFixture.java | 71 +------------------ .../HealthCheckForEndpointsByPollingTest.java | 31 -------- .../AuthorizationRequestServiceTest.java | 7 +- 11 files changed, 7 insertions(+), 213 deletions(-) delete mode 100644 agrirouter-sdk-java-tests/onboarding-responses/farming-software-deactivated.json delete mode 100644 agrirouter-sdk-java-tests/onboarding-responses/farming-software-removed.json delete mode 100644 agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-deactivated.json delete mode 100644 agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-removed.json diff --git a/agrirouter-sdk-java-tests/onboarding-responses/farming-software-deactivated.json b/agrirouter-sdk-java-tests/onboarding-responses/farming-software-deactivated.json deleted file mode 100644 index a6114a1b..00000000 --- a/agrirouter-sdk-java-tests/onboarding-responses/farming-software-deactivated.json +++ /dev/null @@ -1 +0,0 @@ -{"deviceAlternateId":"5c520765-33d6-49a8-bd16-e300375e56ec","capabilityAlternateId":"3035ec70-dca1-4d71-a000-e79eb5891f81","sensorAlternateId":"29a2f1a8-9f38-4375-b882-f9e1fe3c9dee","connectionCriteria":{"gatewayId":"3","measures":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/5c520765-33d6-49a8-bd16-e300375e56ec","commands":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/5c520765-33d6-49a8-bd16-e300375e56ec"},"authentication":{"type":"P12","secret":"NkCktQux#vyiRJF3ANHc2r9eTB2rqUK!XGdJ","certificate":"MIAC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JTJNfjyU0CuX+219Q3tKxxDZYoT2vxI61uNtEor1qwEdT1cmTaMmJzGjBFky5+5zbHVRjCTrdxWzuxz6sWuJ4oD7Kwa9nBHhIskaiveE1Bw+OHt3OVcYHiBp74TjKIQIJJdjGs47eR9JWvWiR6cTUAPCBsvNCACQVylqir3hEAP0dLodhoReKAA507ypg72Ci9JU+JM/W93su7BWrN0tAiMBZWrCad93hjFyhTIcNDOcOfV/gNx9kmdr+3dwpvm2XGzuZm7G8vIshahQ8g4rfL3ieoCmGhIzuU7ZWbE0tuQcqyWHBZMitE7R1LxHftYhbZLn1QxjTAYTFoL7khrjbFjl19NT/mqHNAXprLUdRZhGSf8karYpjfQynpXYO9TkN0Z7YFyzrUAIBV9d+5l/GWtRvHZpIad3EUcTq86JyOSYtnjIviXZ9dL7ohro0G4uRCM52CB4RJnAXJp4c/bd11kUIANPI6veFII5hmSFDXo32I5Pzw/mbSvPyn7Yh7Sgqq/sR0MMDEX4j1RDWTNpVHX7KDkUCLkrRB1sy2xBTXQFeCe5C42PJKdU15vQlrNn/K32mqCrNtrvJ2b6e1y1CKauT8Wtz2cMRWI5LB5RTwi1gdw5RFPkV6iP83V0nO/HtJMjGwIHaEQesSgwAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQUI0CXKAtNkq588dilMAlGiaTFykIECPcSG57Mv/s5AgIH0AAA"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/onboarding-responses/farming-software-removed.json b/agrirouter-sdk-java-tests/onboarding-responses/farming-software-removed.json deleted file mode 100644 index 8bee64c0..00000000 --- a/agrirouter-sdk-java-tests/onboarding-responses/farming-software-removed.json +++ /dev/null @@ -1 +0,0 @@ -{"deviceAlternateId":"49ac8bb0-e545-4b44-a672-e4b9d8bd3e86","capabilityAlternateId":"3035ec70-dca1-4d71-a000-e79eb5891f81","sensorAlternateId":"5eb2a4d7-da77-4142-b19a-54d2dd97af65","connectionCriteria":{"gatewayId":"3","measures":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/49ac8bb0-e545-4b44-a672-e4b9d8bd3e86","commands":"https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/49ac8bb0-e545-4b44-a672-e4b9d8bd3e86"},"authentication":{"type":"P12","secret":"jwNmGqzNfRn#dO7DTGkVu?cZz2Ta86#HhnjH","certificate":"MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQIvqg9N04JQt8CAgfQBIIEyGEeghZKA90wR8KGvmPQgIG+QaUbekRH/WwI8HTOyEfi+A/jRuMI9GtIVfWHYVTE7341dbVvIiejx6B91+RcqAI6/QUU/+Vr1HiRXUVm+e8yLu59sAPnrDOU6ATdcis9B+ZUyL74OyY191v9vn/T0gCzRSw5UjNIyT1t0Ti9ds9vkCMmi3YOSupzqspnhGDylPAwDY3C9pEGW360vG2TrWO4pRJOmH4QhypR8Q2bqwJUukY8kbVdPWtFbh1R+FRCKbfj+UAKhysN+C8y4J+RRQCVwS0GlBodN1G5TSt1akFGNtwkHc2mHwKGZUps0+NZVYWPagtlWMAvFVvmdd7++7l+yRTGBcr7qgfI+BSxfrVJoO6omC1d/HA1gCfVWT43Dz4dMZAZhXQsSp/qzqkr70s6nRJ4hG0ibl71KdoQumioK6JRpHWOIcT4oQIDlVLB9PrCjqHPEPLKG4XuL18abiys2XoGd1u2cLM9eikiEoOsIdA0NpaaO4iyA6ArIYXMsiuv+tcgKVrLZO2FyIqrR685MYLgJstwRb+j94QHFnF02jcVAzKDvyY70Mqn9E2Ips/jU3MBo5KW8Bg9ZjduINGgi74wa05FKC8MsagQNgKwFzOBSaRkyR2Z98GD1HqudMNc/Q50dZSpqo5JXwFb/o7uoiMZTrsL0gYA9RsUrqofqYiXV+i5uxIHefD9ewCrE/VbpPz0iY/FAPg0Z68k7NQ6KmJNF+XC8O/t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H8+HzrGYpeHQk4BBm+fNR1FygcL2EJi3S34POwQOXfOEacauBEJHTV/hEEIHCbEA4GwFEZ6QbX0WzF2Inj6Y9dsvi5uVz7gdBzbvhXdGSyDDbhUyWrwcrifA5S8PS4eM37AieKuB7XTd8ud3DwhkJOcad3KconpDiBX+I/GMthZFhVrREO1YCdeTwQG/UdM3sTwwNx0EicP/N4uRSJnDoUa/FchACWBSMzaN3D3drssQo4RqX1PHjEOPvtohj9GmhpwMbWceH4zCTTfDsBNMA6CYBX1DlkexWVoyC+xU8yDd9OjoPjxX18TeWMAAUdxC5TBgSPSU/we7VFEgnz9/xG1lyFMrdCIwsmy//Pims2fqnDdBGJFoGezkQwWyuLffdsXCVAhTmLkosaCve84JR6R/GpG4QXX/Xe5d1iDTOeQbRCtSXzHxhcfZUkSOiCMP5PKYrjZAc+NWChES8h//v6hhwTTytjPUQTiIpZoQ5zyctsIgRjO+i4rOv2+Xxmb1jTA/6tSszvRSI59bKGus0QXqH3FJIpX+gSoLdrlHzeJJspVkrMxTAnlSutUC//pcQlkEBt+5dq+28kCaoYqFk52h0Yh2rjn3+kbNDLRZ7fMZXi4CKgi3iQ45zmo7aFV30uVCp50l0xBiXOg9yJiOV4Xk+DWgo7r+E3sUIkPj5/RLiFbT/t+pbMZDU3yU13eIadi4Vr6Ken4nehsULQGBUaV6tB4LSkxWic9uluNHx94mPmqlmWooLUIau+CsfROC0w0v/ftndpsj5zu+ysKHaiHFde8V0IWf9dZOjrFdq3fbfOBLUuVrJoJlVcO6z6OK2w3FmmAnk38gAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQUtNXMOkk1aU7qbSbdY3NCejEetJEECPLpnm92vYvpAgIH0AAA"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-deactivated.json b/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-deactivated.json deleted file mode 100644 index 97bb27f5..00000000 --- a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-deactivated.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "deviceAlternateId": "7b77dd4d-3782-4d14-8087-5f3026950427", - "capabilityAlternateId": "3035ec70-dca1-4d71-a000-e79eb5891f81", - "sensorAlternateId": "4c1041ec-787f-44bd-ac11-603746e1191d", - "connectionCriteria": { - "gatewayId": "3", - "measures": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/7b77dd4d-3782-4d14-8087-5f3026950427", - "commands": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/7b77dd4d-3782-4d14-8087-5f3026950427" - }, - "authentication": { - "type": "P12", - "secret": "xxdGPP#a9Tx?a67R3GtuTMc6Z13JaWR#?5cO", - "certificate": "MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQIQYYRa4m1wdMCAgfQBIIEyK7WnnJXtyWHqcBZRDR6g+1WUvTkHy38qBLpPuFYTQCARqPOQBoIYpaeMG4AsybTeoeeJNWeW5AfBfte78xF9UGF2f+qe+TPC/Yw6vx2Gy7tg6uOQiO8QILZGLFOh9uJmmWZQPwz60mm08gS3UgTkdd/qIuUake7qmlvOoQq/I1jXvUMpILOibYfICmO1cfRB0QlgqhRXDSGMot5sMme9+xcmSXjh16iKrWRUPJREFIEkCpgukjaKT9QomwGMSfEvFhd9nlEXnLpZWnoOQwytoWjtU5p13f9OBdjIFidHN1DgM3gKsUdutmHwdvtAq/D20EjQObMoI8WD+8CFlNzWmIVmS8pUnUrZWI3egQsQYCZaIUEz49ZUlqqvyVig6YLmBbek4dXf8JAc6MZeOqLnWL/D0U/P13l0I9mU2WCcEzIsr5Wnb84zlxNvumDiE3VM5cy/A5QvDEEoHoQV0vnnSHiYipNqK45bKaZgpHWZk5MXNyp9zI+PZD48uj2cWoZvkiV9HC/ieRuzOEjogkks+C+RJAow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xMCEwCQYFKw4DAhoFAAQUpyOE3Lksc1WA59uBK057sqice6QECMc4x56Hq6n9AgIH0AAA" - } -} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-removed.json b/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-removed.json deleted file mode 100644 index 07eed543..00000000 --- a/agrirouter-sdk-java-tests/onboarding-responses/telemetry-platform-removed.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "deviceAlternateId": "8fd61af3-3247-4abb-a9bd-e871a1cea4e7", - "capabilityAlternateId": "3035ec70-dca1-4d71-a000-e79eb5891f81", - "sensorAlternateId": "6a3220a9-daf6-4457-812c-7c90aae7b683", - "connectionCriteria": { - "gatewayId": "3", - "measures": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/measures/8fd61af3-3247-4abb-a9bd-e871a1cea4e7", - "commands": "https://dke-qa.eu10.cp.iot.sap/iot/gateway/rest/commands/8fd61af3-3247-4abb-a9bd-e871a1cea4e7" - }, - "authentication": { - "type": "P12", - "secret": "e76r1WIMDPmm3Rx4#bMLS!YNRzTAR1nGX1lv", - "certificate": "MIACAQMwgAYJKoZIhvcNAQcBoIAkgASCBAAwgDCABgkqhkiG9w0BBwGggCSABIIEADCCBRowggUWBgsqhkiG9w0BDAoBAqCCBO4wggTqMBwGCiqGSIb3DQEMAQMwDgQIzfLY2ZrSGnECAgfQBIIEyC79FozwXsvMDVgJpg7j0xnNvRIydPbNxsFPOtu3fp3pQqlrMf1rFnw/IfCBScqjcvRjW/g12/TvRpIKCY3YkoPk1kMRFt+f34Mad0dLC+PBvbrxV8QbYiQFXVKZrr7iVxVOGjNMr4GlPYDwrUWKj7rK83xadwBSAV1GVLrx8/z73rTl8E2gzx3zjvfapVWRgJXeaNf1T1mFdyktQYKoXSSYwQBXlgu79rQuPehlw+dW3amqLgCa2hjyaA5RbGlrjvPe3kVJBbo5U9XDGlRyIHpLmLOPsNJmVso/jAPl4ZRlDONB7jXYqNzap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nbYeNKtevdF1t+VQ02Fl4AOYA3tPZiGSw56Jy8gW/Ui9vLpHnVVUr6LgKMEyQHSxZ2veNyO+yXTHTjNP9CmiwY9A5VMolK6erVJFyFBOYqHsGGMoFcOD61AuZtMei9ndk+LhaI8rZSyIlH+BxalvGC/wNuZdblHPfWTB8aTx+mEkZj3elkyoPioVwhk17li0SV6gAAAAAAAAAAAAAAAAAAAAAAADAxMCEwCQYFKw4DAhoFAAQUrZy/tUYjrt2z4BZ9OEFmMhEggjwECHbwO7Elmt8HAgIH0AAA" - } -} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java index 00fc6885..4e4d0fd5 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/OnboardingResponseRepository.java @@ -48,11 +48,7 @@ public static void save(Identifier identifier, OnboardingResponse onboardingResp */ public enum Identifier { FARMING_SOFTWARE("farming-software"), - FARMING_SOFTWARE_REMOVED("farming-software-removed"), - FARMING_SOFTWARE_DEACTIVATED("farming-software-deactivated"), TELEMETRY_PLATFORM("telemetry-platform"), - TELEMETRY_PLATFORM_REMOVED("telemetry-platform-removed"), - TELEMETRY_PLATFORM_DEACTIVATED("telemetry-platform-deactivated"), COMMUNICATION_UNIT("communication-unit"), MQTT_COMMUNICATION_UNIT("mqtt-communication-unit"); diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java index 79fba002..446f3b06 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/CommunicationUnitFixture.java @@ -36,7 +36,7 @@ class CommunicationUnitFixture extends AbstractIntegrationTest { * application for CUs. */ @Test - //@Disabled("Please replace the placeholder for the registration code to run the test case.") + @Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardCommunicationUnitAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java index 94098250..51b8a5ac 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java @@ -33,7 +33,7 @@ class FarmingSoftwareFixture extends AbstractIntegrationTest { *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/905152eb-c526-47a3-b871-aa46d065bb4c/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= */ @Test - //@Disabled("Please replace the placeholder for the registration code to run the test case.") + @Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardFarmingSoftwareAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); @@ -62,73 +62,4 @@ void onboardFarmingSoftwareAndSaveToFile() throws IOException { OnboardingResponseRepository.Identifier.FARMING_SOFTWARE, onboardingResponse); } - /** - * Create a new registration token by using the following link: - * - *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/905152eb-c526-47a3-b871-aa46d065bb4c/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= - */ - @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") - void onboardAndDeactivateFarmingSoftwareAndSaveToFile() throws IOException { - OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { - }); - SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("4699be2f62"); - onboardingParameters.setApplicationId(farmingSoftware.getApplicationId()); - onboardingParameters.setCertificationVersionId(farmingSoftware.getCertificationVersionId()); - onboardingParameters.setCertificationType(CertificationType.P12); - onboardingParameters.setGatewayId(Gateway.REST.getKey()); - onboardingParameters.setUuid(FARMING_SOFTWARE_DEACTIVATED_ENDPOINT_ID); - onboardingParameters.setPrivateKey(farmingSoftware.getPrivateKey()); - onboardingParameters.setPublicKey(farmingSoftware.getPublicKey()); - final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); - assertNotNull(onboardingResponse); - assertNotNull(onboardingResponse.getCapabilityAlternateId()); - assertNotNull(onboardingResponse.getDeviceAlternateId()); - assertNotNull(onboardingResponse.getSensorAlternateId()); - assertNotNull(onboardingResponse.getAuthentication()); - assertNotNull(onboardingResponse.getAuthentication().getCertificate()); - assertNotNull(onboardingResponse.getAuthentication().getSecret()); - assertNotNull(onboardingResponse.getAuthentication().getType()); - assertNotNull(onboardingResponse.getConnectionCriteria()); - assertNotNull(onboardingResponse.getConnectionCriteria().getMeasures()); - assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); - OnboardingResponseRepository.save( - OnboardingResponseRepository.Identifier.FARMING_SOFTWARE_DEACTIVATED, onboardingResponse); - } - - /** - * Create a new registration token by using the following link: - * - *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/905152eb-c526-47a3-b871-aa46d065bb4c/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= - */ - @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") - void onboardAndRemoveFarmingSoftwareAndSaveToFile() throws IOException { - OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { - }); - SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("bc4eba6065"); - onboardingParameters.setApplicationId(farmingSoftware.getApplicationId()); - onboardingParameters.setCertificationVersionId(farmingSoftware.getCertificationVersionId()); - onboardingParameters.setCertificationType(CertificationType.P12); - onboardingParameters.setGatewayId(Gateway.REST.getKey()); - onboardingParameters.setUuid(UUID.randomUUID().toString()); - onboardingParameters.setPrivateKey(farmingSoftware.getPrivateKey()); - onboardingParameters.setPublicKey(farmingSoftware.getPublicKey()); - final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); - assertNotNull(onboardingResponse); - assertNotNull(onboardingResponse.getCapabilityAlternateId()); - assertNotNull(onboardingResponse.getDeviceAlternateId()); - assertNotNull(onboardingResponse.getSensorAlternateId()); - assertNotNull(onboardingResponse.getAuthentication()); - assertNotNull(onboardingResponse.getAuthentication().getCertificate()); - assertNotNull(onboardingResponse.getAuthentication().getSecret()); - assertNotNull(onboardingResponse.getAuthentication().getType()); - assertNotNull(onboardingResponse.getConnectionCriteria()); - assertNotNull(onboardingResponse.getConnectionCriteria().getMeasures()); - assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); - OnboardingResponseRepository.save( - OnboardingResponseRepository.Identifier.FARMING_SOFTWARE_REMOVED, onboardingResponse); - } } diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java index a0e5faa3..1aaf1882 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java @@ -36,7 +36,7 @@ class MqttCommunicationUnitFixture extends AbstractIntegrationTest { * application for CUs. */ @Test - //@Disabled("Please replace the placeholder for the registration code to run the test case.") + @Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardCommunicationUnitAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java index 02273658..6abd4639 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/TelemetryPlatformFixture.java @@ -29,7 +29,7 @@ class TelemetryPlatformFixture extends AbstractIntegrationTest { *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/3c3559c9-7062-4628-a4f7-c9f5aa07265f/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= */ @Test - //@Disabled("Please replace the placeholder for the registration code to run the test case.") + @Disabled("Please replace the placeholder for the registration code to run the test case.") void onboardTelemetryPlatformAndSaveToFile() throws IOException { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); @@ -58,73 +58,4 @@ void onboardTelemetryPlatformAndSaveToFile() throws IOException { OnboardingResponseRepository.Identifier.TELEMETRY_PLATFORM, onboardingResponse); } - /** - * Create a new registration token by using the following link: - * - *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/3c3559c9-7062-4628-a4f7-c9f5aa07265f/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= - */ - @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") - void onboardAndDeactivateTelemetryPlatformAndSaveToFile() throws IOException { - OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { - }); - SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("b8dbca89d8"); - onboardingParameters.setApplicationId(telemetryPlatform.getApplicationId()); - onboardingParameters.setCertificationVersionId(telemetryPlatform.getCertificationVersionId()); - onboardingParameters.setCertificationType(CertificationType.P12); - onboardingParameters.setGatewayId(Gateway.REST.getKey()); - onboardingParameters.setUuid(UUID.randomUUID().toString()); - onboardingParameters.setPrivateKey(telemetryPlatform.getPrivateKey()); - onboardingParameters.setPublicKey(telemetryPlatform.getPublicKey()); - final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); - assertNotNull(onboardingResponse); - assertNotNull(onboardingResponse.getCapabilityAlternateId()); - assertNotNull(onboardingResponse.getDeviceAlternateId()); - assertNotNull(onboardingResponse.getSensorAlternateId()); - assertNotNull(onboardingResponse.getAuthentication()); - assertNotNull(onboardingResponse.getAuthentication().getCertificate()); - assertNotNull(onboardingResponse.getAuthentication().getSecret()); - assertNotNull(onboardingResponse.getAuthentication().getType()); - assertNotNull(onboardingResponse.getConnectionCriteria()); - assertNotNull(onboardingResponse.getConnectionCriteria().getMeasures()); - assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); - OnboardingResponseRepository.save( - OnboardingResponseRepository.Identifier.TELEMETRY_PLATFORM_DEACTIVATED, onboardingResponse); - } - - /** - * Create a new registration token by using the following link: - * - *

https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/3c3559c9-7062-4628-a4f7-c9f5aa07265f/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri= - */ - @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") - void onboardAndRemoveTelemetryPlatformAndSaveToFile() throws IOException { - OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { - }); - SecuredOnboardingParameters onboardingParameters = new SecuredOnboardingParameters(); - onboardingParameters.setRegistrationCode("bea75dff01"); - onboardingParameters.setApplicationId(telemetryPlatform.getApplicationId()); - onboardingParameters.setCertificationVersionId(telemetryPlatform.getCertificationVersionId()); - onboardingParameters.setCertificationType(CertificationType.P12); - onboardingParameters.setGatewayId(Gateway.REST.getKey()); - onboardingParameters.setUuid(UUID.randomUUID().toString()); - onboardingParameters.setPrivateKey(telemetryPlatform.getPrivateKey()); - onboardingParameters.setPublicKey(telemetryPlatform.getPublicKey()); - final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); - assertNotNull(onboardingResponse); - assertNotNull(onboardingResponse.getCapabilityAlternateId()); - assertNotNull(onboardingResponse.getDeviceAlternateId()); - assertNotNull(onboardingResponse.getSensorAlternateId()); - assertNotNull(onboardingResponse.getAuthentication()); - assertNotNull(onboardingResponse.getAuthentication().getCertificate()); - assertNotNull(onboardingResponse.getAuthentication().getSecret()); - assertNotNull(onboardingResponse.getAuthentication().getType()); - assertNotNull(onboardingResponse.getConnectionCriteria()); - assertNotNull(onboardingResponse.getConnectionCriteria().getMeasures()); - assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); - OnboardingResponseRepository.save( - OnboardingResponseRepository.Identifier.TELEMETRY_PLATFORM_REMOVED, onboardingResponse); - } } diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java index 53e4196a..03041db3 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java @@ -32,35 +32,4 @@ class HealthCheckForEndpointsByPollingTest extends AbstractIntegrationTest { Assertions.assertFalse(optionalMessageResponses.isPresent()); } - @Test - void - givenExistingAndDeactivatedEndpointWhenPollingTheOutboxThenTheAgrirouterShouldReturnAnEmptyResult() - throws IOException { - final var onboardingResponse = - OnboardingResponseRepository.read( - OnboardingResponseRepository.Identifier.FARMING_SOFTWARE_DEACTIVATED); - FetchMessageService fetchMessageService = new FetchMessageServiceImpl(); - final var optionalMessageResponses = - fetchMessageService.fetch( - onboardingResponse, - new DefaultCancellationToken( - MessageFetcher.MAX_TRIES_BEFORE_FAILURE, MessageFetcher.DEFAULT_INTERVAL)); - Assertions.assertFalse(optionalMessageResponses.isPresent()); - } - - @Test - void givenRemovedEndpointWhenPollingTheOutboxThenTheAgrirouterShouldDenyAccessToTheApi() - throws IOException { - final var onboardingResponse = - OnboardingResponseRepository.read( - OnboardingResponseRepository.Identifier.FARMING_SOFTWARE_REMOVED); - FetchMessageService fetchMessageService = new FetchMessageServiceImpl(); - Assertions.assertThrows( - UnauthorizedRequestException.class, - () -> - fetchMessageService.fetch( - onboardingResponse, - new DefaultCancellationToken( - MessageFetcher.MAX_TRIES_BEFORE_FAILURE, MessageFetcher.DEFAULT_INTERVAL))); - } } diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/onboarding/AuthorizationRequestServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/onboarding/AuthorizationRequestServiceTest.java index acb32f43..04fb32de 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/onboarding/AuthorizationRequestServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/onboarding/AuthorizationRequestServiceTest.java @@ -33,7 +33,7 @@ void givenValidParameterWhenCreatingTheUrlThenTheUrlShouldBeGeneratedForFarmingS assertNotNull(authorizationRequestURL); assertTrue(StringUtils.isNotBlank(authorizationRequestURL)); assertEquals( - "https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/905152eb-c526-47a3-b871-aa46d065bb4c/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri=", + "https://app.qa.agrirouter.farm/application/" + farmingSoftware.getApplicationId() + "/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri=", authorizationRequestURL); } @@ -52,7 +52,7 @@ void givenValidParameterWhenCreatingTheUrlThenTheUrlShouldBeGeneratedForTelemetr assertNotNull(authorizationRequestURL); assertTrue(StringUtils.isNotBlank(authorizationRequestURL)); assertEquals( - "https://agrirouter-qa.cfapps.eu10.hana.ondemand.com/application/3c3559c9-7062-4628-a4f7-c9f5aa07265f/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri=", + "https://app.qa.agrirouter.farm/application/" + telemetryPlatform.getApplicationId() + "/authorize?response_type=onboard&state=my-custom-state-to-identify-the-request&redirect_uri=", authorizationRequestURL); } @@ -66,7 +66,6 @@ void givenInvalidParameterWhenCreatingTheUrlThenTheUrlShouldBeGenerated() { authorizationRequestParameters.setResponseType(SecuredOnboardingResponseType.ONBOARD); Assertions.assertThrows( IllegalParameterDefinitionException.class, - () -> - authorizationRequestService.getAuthorizationRequestURL(authorizationRequestParameters)); + () -> authorizationRequestService.getAuthorizationRequestURL(authorizationRequestParameters)); } } From 269b4e044b5089d6695ab016f1e0dd7d03667040 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 09:53:44 +0200 Subject: [PATCH 10/16] Remove obsolete onboarding responses JSON files Deleted JSON files for deactivated and removed farming software as well as telemetry platform to clean up outdated resources. These files are no longer needed and have been removed to maintain a leaner project repository. --- .../onboarding-responses/mqtt-communication-unit.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json index f9d38153..7669f05c 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json @@ -1 +1 @@ -{"deviceAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","capabilityAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","sensorAlternateId":"235e74ce-f533-43b3-86ec-462a712a666f","connectionCriteria":{"gatewayId":"3","measures":"https://gateway-service.qa.agrirouter.farm/inbox/235e74ce-f533-43b3-86ec-462a712a666f","commands":"https://gateway-service.qa.agrirouter.farm/outbox/235e74ce-f533-43b3-86ec-462a712a666f"},"authentication":{"type":"P12","secret":"h0sFbZ9brOTslVdP","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaC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NhcEeaB/AOExAx1hAVJYL8ANoCgliVK8jRYYfkzGgoRQ3BMS3Bab2CmL9jDcIOSeErCdshpKeZp/KTc7omU9jnRJazPLTT3zVCY3Gn3yAaMho+N3NyXiczThQdfcZOKLe0DPKVuzYwjHDq/tlYWA28EnckyKSGhhMxQxnNLxxQi61V6Oo/wBq4CpjDm3wxqH4NpqgVK8Yd+XW8bzv5oZdi1VG3aWSFR/eoYh5bwK2QpaPk25UtUkThUucxJTAjBgkqhkiG9w0BCRUxFgQUCRsKQQ9H9SpmZXW/+Ntni4bRqfIwKzAfMAcGBSsOAwIaBBRx131ysbfPd79mLI6tAd64VqplGgQIKiYSyjWh/C0\u003d"}} \ No newline at end of file +{"deviceAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","capabilityAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","sensorAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","connectionCriteria":{"gatewayId":"2","measures":"measures/cf9daf5e-509a-4348-8a82-20dd3c8d7103","commands":"commands/cf9daf5e-509a-4348-8a82-20dd3c8d7103","host":"mqtt.qa.agrirouter.farm","port":"8883","clientId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103"},"authentication":{"type":"P12","secret":"wFC2XGML73OiTeJ3","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQI6i9XeWU2MW0CAggAgIIFqKQvT0eUwAVmvITNV5XGQlQRJwC1tadWQYHwrHSh3+c+OmTlAiib2HPlz92BVJ1Kp1PlK9IrsSPi/qZ3rEe9k4b1LftIYhUwHYZ5YDLWyk/pSIeRyrVDLlDMb2gdccTflt4QJLL+gBc9tGovjqfpb0jfKCIYHtwR054xjdUsMHSFZKYXDFsqS4JCtS4mPYD973kx6ETqcTEq2ORVe8SuGNbmfWzEcfM0lI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No newline at end of file From c636aedea94c21a270e0c3119eed2df38cb6b46c Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 10:26:02 +0200 Subject: [PATCH 11/16] Refactor MQTT test cases for better integration Updated `PingServiceTest` to extend `AbstractIntegrationTest` and added necessary imports and services for MQTT testing. Modified `MqttCommunicationUnitFixture` to use MQTT instead of REST and added a logger for message delivery confirmation. Adjusted onboarding response JSON to match the new configuration. --- .gitignore | 5 +- .../mqtt-communication-unit.json | 2 +- .../fixture/MqttCommunicationUnitFixture.java | 70 +++++++++++++++---- .../test/messaging/mqtt/PingServiceTest.java | 17 ++++- 4 files changed, 76 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 659ca628..b4a56a0b 100644 --- a/.gitignore +++ b/.gitignore @@ -25,4 +25,7 @@ buildNumber.properties .settings # GENERATED # -src/main/generated \ No newline at end of file +src/main/generated + +# LCK # +*.lck \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json index 7669f05c..0ebac28e 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json @@ -1 +1 @@ -{"deviceAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","capabilityAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","sensorAlternateId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103","connectionCriteria":{"gatewayId":"2","measures":"measures/cf9daf5e-509a-4348-8a82-20dd3c8d7103","commands":"commands/cf9daf5e-509a-4348-8a82-20dd3c8d7103","host":"mqtt.qa.agrirouter.farm","port":"8883","clientId":"cf9daf5e-509a-4348-8a82-20dd3c8d7103"},"authentication":{"type":"P12","secret":"wFC2XGML73OiTeJ3","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCB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KPucTiVHq0A/ALVsdWRYrm6Bn1k2p1RryUEro0Dgxe+kj9yboPAU7ObOGYyI5CXQB6fdf2F5x8p19l9mmPIosoHVzCvNUcxqYRREOg8IO3zA/EyWPqCzdO2yWq2IrbNgrswL4U32avkFqlOlKmyLmbjOyTj5GTwvTMU+/pOaTELsDw1kRV1mBePv+OqmISY8uy8nynnL8pm4m5IxJTAjBgkqhkiG9w0BCRUxFgQUNqdRMmQ273oZnCfMt4m6Fmdrat0wKzAfMAcGBSsOAwIaBBQBeatS67oH8yyzUH6CbJzjGFIeDgQIm6snmUoDiko\u003d"}} \ No newline at end of file +{"deviceAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","capabilityAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","sensorAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","connectionCriteria":{"gatewayId":"2","measures":"measures/0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","commands":"commands/0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","host":"mqtt.qa.agrirouter.farm","port":"8883","clientId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9"},"authentication":{"type":"P12","secret":"8Pok2uiF95UgttKK","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIKo7j8LNT/KMCAggAgIIFqO28gsss9kyKG9ciUWhiYI5ZtbqK2oH3aJ3vj8bMTr2S1Os0Vv7NAFmfbF5qVASajsac5MJhxsR5b5hJgrnR7Vviah2AG2MA9olxIsNfVsaUMnkbCv+Ji4G+eDen2vsMyzPjbjBfHkLxjyZ7h6bNq8/ZBLv/5TMeDEpUNn8xpKRYJFncwMGS5GBCtWTzbuX7Gh+w5+TX2ZW8eypYvcHnq89uhM+ovgGKEmatzSJ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aprmgyc7RxDyty2s46QQIA32W9Y+FMlA\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java index 1aaf1882..179a34c5 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java @@ -1,7 +1,6 @@ package com.dke.data.agrirouter.test.fixture; import agrirouter.request.payload.endpoint.Capabilities; -import com.dke.data.agrirouter.api.cancellation.DefaultCancellationToken; import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse; import com.dke.data.agrirouter.api.enums.ApplicationType; import com.dke.data.agrirouter.api.enums.CertificationType; @@ -11,15 +10,21 @@ import com.dke.data.agrirouter.api.service.onboard.OnboardingService; import com.dke.data.agrirouter.api.service.parameters.OnboardingParameters; import com.dke.data.agrirouter.api.service.parameters.SetCapabilitiesParameters; -import com.dke.data.agrirouter.impl.messaging.rest.FetchMessageServiceImpl; -import com.dke.data.agrirouter.impl.messaging.rest.SetCapabilityServiceImpl; +import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; +import com.dke.data.agrirouter.convenience.mqtt.client.MqttOptionService; +import com.dke.data.agrirouter.impl.messaging.mqtt.SetCapabilityServiceImpl; import com.dke.data.agrirouter.impl.onboard.OnboardingServiceImpl; import com.dke.data.agrirouter.test.AbstractIntegrationTest; import com.dke.data.agrirouter.test.OnboardingResponseRepository; -import org.junit.jupiter.api.Disabled; +import org.eclipse.paho.client.mqttv3.IMqttClient; +import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; +import org.eclipse.paho.client.mqttv3.MqttCallback; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; -import java.io.IOException; import java.util.Collections; import java.util.UUID; @@ -31,21 +36,25 @@ @SuppressWarnings("ALL") class MqttCommunicationUnitFixture extends AbstractIntegrationTest { + private static final Logger LOGGER = LoggerFactory.getLogger(MqttCommunicationUnitFixture.class); + + private static boolean messageHasBeenDelivered = false; + /** * Create a new registration token by using the agrirouter UI and select the integration test * application for CUs. */ @Test - @Disabled("Please replace the placeholder for the registration code to run the test case.") - void onboardCommunicationUnitAndSaveToFile() throws IOException { + //@Disabled("Please replace the placeholder for the registration code to run the test case.") + void onboardCommunicationUnitAndSaveToFile() throws Throwable { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); OnboardingParameters onboardingParameters = new OnboardingParameters(); - onboardingParameters.setRegistrationCode("0639546829"); + onboardingParameters.setRegistrationCode("7140425316"); onboardingParameters.setApplicationId(communicationUnit.getApplicationId()); onboardingParameters.setCertificationVersionId(communicationUnit.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); - onboardingParameters.setGatewayId(Gateway.REST.getKey()); + onboardingParameters.setGatewayId(Gateway.MQTT.getKey()); onboardingParameters.setApplicationType(ApplicationType.APPLICATION); onboardingParameters.setUuid(UUID.randomUUID().toString()); final OnboardingResponse onboardingResponse = onboardingService.onboard(onboardingParameters); @@ -62,7 +71,17 @@ void onboardCommunicationUnitAndSaveToFile() throws IOException { assertNotNull(onboardingResponse.getConnectionCriteria().getCommands()); OnboardingResponseRepository.save( OnboardingResponseRepository.Identifier.MQTT_COMMUNICATION_UNIT, onboardingResponse); - final SetCapabilityServiceImpl setCapabilityService = new SetCapabilityServiceImpl(); + + MqttClientService mqttClientService = new MqttClientService(new QA() { + }); + IMqttClient mqttClient = mqttClientService.create(onboardingResponse); + + MqttOptionService mqttOptionService = new MqttOptionService(new QA() { + }); + mqttClient.setCallback(new InternalCallback()); + mqttClient.connect(mqttOptionService.createMqttConnectOptions(onboardingResponse)); + + final SetCapabilityServiceImpl setCapabilityService = new SetCapabilityServiceImpl(mqttClient); final SetCapabilitiesParameters setCapabilitiesParameters = new SetCapabilitiesParameters(); setCapabilitiesParameters.setApplicationId(communicationUnit.getApplicationId()); setCapabilitiesParameters.setCertificationVersionId( @@ -75,9 +94,32 @@ void onboardCommunicationUnitAndSaveToFile() throws IOException { setCapabilitiesParameters.setCapabilitiesParameters( Collections.singletonList(capabilityParameters)); setCapabilityService.send(setCapabilitiesParameters); - final FetchMessageServiceImpl fetchMessageService = new FetchMessageServiceImpl(); - fetchMessageService.fetch( - onboardingResponse, - new DefaultCancellationToken(MAX_TRIES_BEFORE_FAILURE, DEFAULT_INTERVAL)); + + int nrOfRetries = 0; + while (!messageHasBeenDelivered && nrOfRetries < 10) { + LOGGER.debug("Waiting for message to arrive, retrying in 1 second. This is the {} retry.", nrOfRetries); + Thread.sleep(1000); + nrOfRetries++; + } + mqttClient.disconnect(); + + Assertions.assertTrue(messageHasBeenDelivered, "Message has not delivered within the timeout configured. There were " + nrOfRetries + " retries."); + } + + class InternalCallback implements MqttCallback { + + + @Override + public void connectionLost(Throwable throwable) { + } + + @Override + public void messageArrived(String s, MqttMessage mqttMessage) throws Exception { + } + + @Override + public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) { + messageHasBeenDelivered = true; + } } } diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java index 2bab08e6..1b55bdf6 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -1,11 +1,24 @@ package com.dke.data.agrirouter.test.messaging.mqtt; +import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse; +import com.dke.data.agrirouter.api.env.QA; +import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; +import com.dke.data.agrirouter.convenience.mqtt.client.MqttOptionService; +import com.dke.data.agrirouter.test.AbstractIntegrationTest; +import com.dke.data.agrirouter.test.OnboardingResponseRepository; import org.junit.jupiter.api.Test; -class PingServiceTest { +class PingServiceTest extends AbstractIntegrationTest { @Test - void sendHealthMessageToPingEndpoint() { + void sendHealthMessageToPingEndpoint() throws Throwable { + OnboardingResponse onboardingResponse = OnboardingResponseRepository.read(OnboardingResponseRepository.Identifier.MQTT_COMMUNICATION_UNIT); + + MqttOptionService mqttOptionService = new MqttOptionService(new QA() { + }); + MqttClientService mqttClientService = new MqttClientService(new QA() { + }); } + } From a9c30f7e52cd0ce2fa9ee48ad55f8a147b0e9038 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 11:07:08 +0200 Subject: [PATCH 12/16] Enhance MQTT Ping Service tests and fix onboarding fixture Refactored `PingServiceTest` to include message delivery and arrival checks. Updated `MqttCommunicationUnitFixture` to match the new test structure and modified the registration code in onboarding parameters. This ensures robust message handling and consistency in tests. --- .../mqtt-communication-unit.json | 2 +- .../fixture/MqttCommunicationUnitFixture.java | 8 ++- .../test/messaging/mqtt/PingServiceTest.java | 63 +++++++++++++++++-- 3 files changed, 66 insertions(+), 7 deletions(-) diff --git a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json index 0ebac28e..00cf94be 100644 --- a/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json +++ b/agrirouter-sdk-java-tests/onboarding-responses/mqtt-communication-unit.json @@ -1 +1 @@ -{"deviceAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","capabilityAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","sensorAlternateId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","connectionCriteria":{"gatewayId":"2","measures":"measures/0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","commands":"commands/0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9","host":"mqtt.qa.agrirouter.farm","port":"8883","clientId":"0f5a5ebc-ddf3-4cbf-8eab-ac23b84d1ea9"},"authentication":{"type":"P12","secret":"8Pok2uiF95UgttKK","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIKo7j8LNT/KMCAggAgIIFqO28gsss9kyKG9ciUWhiYI5ZtbqK2oH3aJ3vj8bMTr2S1Os0Vv7NAFmfbF5qVASajsac5MJhxsR5b5hJgrnR7Vviah2AG2MA9olxIsNfVsaUMnkbCv+Ji4G+eDen2vsMyzPjbjBfHkLxjyZ7h6bNq8/ZBLv/5TMeDEpUNn8xpKRYJFncwMGS5GBCtWTzbuX7Gh+w5+TX2ZW8eypYvcHnq89uhM+ovgGKEmatzSJUl5tzWp1aZZJoLTd9/Y5mvv4/4BmQkwBKt96zuCWzjNOQtT0b9+qx4NvmZY2789VDbXmAlkbKEbJji1Jh8UUA1Ux6kGuSEMbg8SUQLK/e3Qiixles7sV42GY5G50U9Mq8k+HpqKwYe6Idv98+7luDEoU47uq9/yGy9yc/Syg0X4pG9omonXbEwWShXgZ6sGjCpOO6cWZBdDL9lFu3J7POirs7hINH+oI7pR1mWNIKGQMGhBloL+rTStKB10vSk/G1HOl0MU+CT7SpBprvuY9j6hB+2yHzh8FyKe4ngM36JqkHhLjUT8XnYxxtKcXhFcDniuJUx89UNOlEYhsf2/6BKfDYzR0+h5vl00EURbBJz92Z7ppPUukWPrnEmZfRUGzpvQZgvJXiukeC+bbBIzPB8JUTcnMIdRSfSdti1bX9I5dkmUhOtiu9lGMu6FTNz72C6PiDFspBLkjtBZ1RKjPZlzBKgAlaPSkszySxl94HYgpa4Q6f48mEB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KLof222U/RlLHgpGnxpqlZO6IBTXEeHiAOkTGrfluYpiHp2apgpoqrhCDb8wXVazoK1wMe2xQeigpTZ9pt59sSOn0L0lt7eDyeMK9bCd6u4F/xAoMezGIuwjVfZWX3zBhWLtRztGW+hBHg+7GzTzUASDvy8Gup90ctuyqXdRTGFyjHqq3zsrriwZdZV6M32L0ViUkfTMCBux5eVa03KX1cQ3xx2KUj2J7mW1OnQVkbNc/Lmmz9ZZxkbeYEd05r48Ya2dkz+kN+MsDD5tLetoIpaYiUAZsAC9OoabjVCoNbFSCZgtzNdWd8kij+yIAlwLeFyQMhnZJU2Z+hQxwUDgdN+Rl6ThsJudmrXhrjkc5vGSMRMfvBk6P7G4wx4MSBZp1MskfpgH0n73uPcP0NQKpttfc68mTXzKd++EXgjLslAGtUI1jd2M/iaZoYO3OCDaGdWu5pVa4RrrIL7hlgRMB5ccplXNf4u6jlHQNM2U3JirtzUxJTAjBgkqhkiG9w0BCRUxFgQUx46IuxpL5iCLKysIGnUO2vNMGhkwKzAfMAcGBSsOAwIaBBSNiS8hLI0aprmgyc7RxDyty2s46QQIA32W9Y+FMlA\u003d"}} \ No newline at end of file +{"deviceAlternateId":"c2824851-4de8-4e27-a583-4d47fe314d5d","capabilityAlternateId":"c2824851-4de8-4e27-a583-4d47fe314d5d","sensorAlternateId":"c2824851-4de8-4e27-a583-4d47fe314d5d","connectionCriteria":{"gatewayId":"2","measures":"measures/c2824851-4de8-4e27-a583-4d47fe314d5d","commands":"commands/c2824851-4de8-4e27-a583-4d47fe314d5d","host":"mqtt.qa.agrirouter.farm","port":"8883","clientId":"c2824851-4de8-4e27-a583-4d47fe314d5d"},"authentication":{"type":"P12","secret":"ETuQsLEV2NyOwx0R","certificate":"MIINwwIBAzCCDY8GCSqGSIb3DQEHAaCCDYAEgg18MIINeDCCBe8GCSqGSIb3DQEHBqCCBeAwggXcAgEAMIIF1QYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMwDgQIEnjxHqHRJfkCAggA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wYJQRavlpQKZa7nb5V5D9VNNoYSxR/ASXAkwgwzHOOESiuPs+qKUWW9PHEWGa2wijrtTVSZgQRPw5YYCbC3yBEpxXxgGSRs/vcf2oVbDWuNOAUxJTAjBgkqhkiG9w0BCRUxFgQU7qPl7BRAoMXPxJx7gHqAyijlt+YwKzAfMAcGBSsOAwIaBBRLZVNvBVEU6onJbhOn61n28jYcQAQIEAULVM/rA8A\u003d"}} \ No newline at end of file diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java index 179a34c5..428c8935 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/MqttCommunicationUnitFixture.java @@ -38,6 +38,7 @@ class MqttCommunicationUnitFixture extends AbstractIntegrationTest { private static final Logger LOGGER = LoggerFactory.getLogger(MqttCommunicationUnitFixture.class); + private static boolean messageHasArrived = false; private static boolean messageHasBeenDelivered = false; /** @@ -50,7 +51,7 @@ void onboardCommunicationUnitAndSaveToFile() throws Throwable { OnboardingService onboardingService = new OnboardingServiceImpl(new QA() { }); OnboardingParameters onboardingParameters = new OnboardingParameters(); - onboardingParameters.setRegistrationCode("7140425316"); + onboardingParameters.setRegistrationCode("4822479417"); onboardingParameters.setApplicationId(communicationUnit.getApplicationId()); onboardingParameters.setCertificationVersionId(communicationUnit.getCertificationVersionId()); onboardingParameters.setCertificationType(CertificationType.P12); @@ -80,6 +81,7 @@ void onboardCommunicationUnitAndSaveToFile() throws Throwable { }); mqttClient.setCallback(new InternalCallback()); mqttClient.connect(mqttOptionService.createMqttConnectOptions(onboardingResponse)); + mqttClient.subscribe(onboardingResponse.getConnectionCriteria().getCommands()); final SetCapabilityServiceImpl setCapabilityService = new SetCapabilityServiceImpl(mqttClient); final SetCapabilitiesParameters setCapabilitiesParameters = new SetCapabilitiesParameters(); @@ -96,7 +98,7 @@ void onboardCommunicationUnitAndSaveToFile() throws Throwable { setCapabilityService.send(setCapabilitiesParameters); int nrOfRetries = 0; - while (!messageHasBeenDelivered && nrOfRetries < 10) { + while (!messageHasBeenDelivered && !messageHasArrived && nrOfRetries < 10) { LOGGER.debug("Waiting for message to arrive, retrying in 1 second. This is the {} retry.", nrOfRetries); Thread.sleep(1000); nrOfRetries++; @@ -104,6 +106,7 @@ void onboardCommunicationUnitAndSaveToFile() throws Throwable { mqttClient.disconnect(); Assertions.assertTrue(messageHasBeenDelivered, "Message has not delivered within the timeout configured. There were " + nrOfRetries + " retries."); + Assertions.assertTrue(messageHasArrived, "Message has not arrived within the timeout configured. There were " + nrOfRetries + " retries."); } class InternalCallback implements MqttCallback { @@ -115,6 +118,7 @@ public void connectionLost(Throwable throwable) { @Override public void messageArrived(String s, MqttMessage mqttMessage) throws Exception { + messageHasArrived = true; } @Override diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java index 1b55bdf6..ca0393a3 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -1,23 +1,78 @@ package com.dke.data.agrirouter.test.messaging.mqtt; -import com.dke.data.agrirouter.api.dto.onboard.OnboardingResponse; import com.dke.data.agrirouter.api.env.QA; +import com.dke.data.agrirouter.api.service.messaging.mqtt.PingService; +import com.dke.data.agrirouter.api.service.parameters.PingParameters; import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; import com.dke.data.agrirouter.convenience.mqtt.client.MqttOptionService; +import com.dke.data.agrirouter.impl.messaging.mqtt.PingServiceImpl; import com.dke.data.agrirouter.test.AbstractIntegrationTest; import com.dke.data.agrirouter.test.OnboardingResponseRepository; +import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; +import org.eclipse.paho.client.mqttv3.MqttCallback; +import org.eclipse.paho.client.mqttv3.MqttMessage; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; class PingServiceTest extends AbstractIntegrationTest { + private static final Logger LOGGER = LoggerFactory.getLogger(PingServiceTest.class); + + private static boolean messageHasArrived = false; + private static boolean messageHasBeenDelivered = false; + + @Test void sendHealthMessageToPingEndpoint() throws Throwable { - OnboardingResponse onboardingResponse = OnboardingResponseRepository.read(OnboardingResponseRepository.Identifier.MQTT_COMMUNICATION_UNIT); + var onboardingResponse = OnboardingResponseRepository.read(OnboardingResponseRepository.Identifier.MQTT_COMMUNICATION_UNIT); - MqttOptionService mqttOptionService = new MqttOptionService(new QA() { + var mqttClientService = new MqttClientService(new QA() { }); - MqttClientService mqttClientService = new MqttClientService(new QA() { + var mqttClient = mqttClientService.create(onboardingResponse); + + var mqttOptionService = new MqttOptionService(new QA() { }); + mqttClient.setCallback(new PingServiceTest.InternalCallback()); + mqttClient.connect(mqttOptionService.createMqttConnectOptions(onboardingResponse)); + mqttClient.subscribe(onboardingResponse.getConnectionCriteria().getCommands()); + + var pingParameters = new PingParameters(); + pingParameters.setOnboardingResponse(onboardingResponse); + + PingService pingService = new PingServiceImpl(mqttClient); + pingService.send(pingParameters); + + var nrOfRetries = 0; + while (!messageHasBeenDelivered && !messageHasArrived && nrOfRetries < 10) { + LOGGER.debug("Waiting for message to arrive, retrying in 1 second. This is the {} retry.", nrOfRetries); + //noinspection BusyWait + Thread.sleep(1000); + nrOfRetries++; + } + mqttClient.disconnect(); + + Assertions.assertTrue(messageHasBeenDelivered, "Message has not delivered within the timeout configured. There were " + nrOfRetries + " retries."); + Assertions.assertTrue(messageHasArrived, "Message has not arrived within the timeout configured. There were " + nrOfRetries + " retries."); + } + + static class InternalCallback implements MqttCallback { + + + @Override + public void connectionLost(Throwable throwable) { + } + + @Override + public void messageArrived(String s, MqttMessage mqttMessage) throws Exception { + messageHasArrived = true; + } + + @Override + public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) { + messageHasBeenDelivered = true; + } } From aab8019815c416362435ee3f8a933c95b67f6a20 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 11:27:21 +0200 Subject: [PATCH 13/16] Refactor `PingServiceTest` and enhance message handling. Refactored the `PingServiceTest` to use instance variables instead of static. Enhance the `messageArrived` method to decode and validate incoming messages, improving test reliability and logging. --- .../test/messaging/mqtt/PingServiceTest.java | 28 +++++++++++++++---- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java index ca0393a3..58ad5457 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -1,13 +1,19 @@ package com.dke.data.agrirouter.test.messaging.mqtt; +import agrirouter.response.Response; +import com.dke.data.agrirouter.api.dto.messaging.FetchMessageResponse; import com.dke.data.agrirouter.api.env.QA; +import com.dke.data.agrirouter.api.service.messaging.encoding.DecodeMessageService; import com.dke.data.agrirouter.api.service.messaging.mqtt.PingService; import com.dke.data.agrirouter.api.service.parameters.PingParameters; import com.dke.data.agrirouter.convenience.mqtt.client.MqttClientService; import com.dke.data.agrirouter.convenience.mqtt.client.MqttOptionService; +import com.dke.data.agrirouter.impl.messaging.encoding.DecodeMessageServiceImpl; import com.dke.data.agrirouter.impl.messaging.mqtt.PingServiceImpl; import com.dke.data.agrirouter.test.AbstractIntegrationTest; import com.dke.data.agrirouter.test.OnboardingResponseRepository; +import com.google.gson.Gson; +import org.apache.commons.lang3.StringUtils; import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken; import org.eclipse.paho.client.mqttv3.MqttCallback; import org.eclipse.paho.client.mqttv3.MqttMessage; @@ -16,13 +22,17 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.nio.charset.StandardCharsets; + class PingServiceTest extends AbstractIntegrationTest { private static final Logger LOGGER = LoggerFactory.getLogger(PingServiceTest.class); - private static boolean messageHasArrived = false; - private static boolean messageHasBeenDelivered = false; + private boolean messageHasArrived = false; + private boolean messageHasBeenDelivered = false; + private static String healthMessageId = null; + private final DecodeMessageService decodeMessageService = new DecodeMessageServiceImpl(); @Test void sendHealthMessageToPingEndpoint() throws Throwable { @@ -42,7 +52,7 @@ void sendHealthMessageToPingEndpoint() throws Throwable { pingParameters.setOnboardingResponse(onboardingResponse); PingService pingService = new PingServiceImpl(mqttClient); - pingService.send(pingParameters); + healthMessageId = pingService.send(pingParameters); var nrOfRetries = 0; while (!messageHasBeenDelivered && !messageHasArrived && nrOfRetries < 10) { @@ -57,7 +67,7 @@ void sendHealthMessageToPingEndpoint() throws Throwable { Assertions.assertTrue(messageHasArrived, "Message has not arrived within the timeout configured. There were " + nrOfRetries + " retries."); } - static class InternalCallback implements MqttCallback { + class InternalCallback implements MqttCallback { @Override @@ -66,7 +76,15 @@ public void connectionLost(Throwable throwable) { @Override public void messageArrived(String s, MqttMessage mqttMessage) throws Exception { - messageHasArrived = true; + var payload = StringUtils.toEncodedString(mqttMessage.getPayload(), StandardCharsets.UTF_8); + final var fetchMessageResponse = new Gson().fromJson(payload, FetchMessageResponse.class); + final var decodedMessageResponse = decodeMessageService.decode(fetchMessageResponse.getCommand().getMessage()); + LOGGER.debug("Message arrived: {}", decodedMessageResponse); + if (decodedMessageResponse.getResponseEnvelope().getType() == Response.ResponseEnvelope.ResponseBodyType.ACK) { + messageHasArrived = StringUtils.equals(decodedMessageResponse.getResponseEnvelope().getApplicationMessageId(), healthMessageId); + } else { + LOGGER.warn("Message arrived, but this should not be the case {}.", decodedMessageResponse); + } } @Override From 1355624f48fba18c3eae7856bf65738d67630f31 Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 11:28:29 +0200 Subject: [PATCH 14/16] Remove unused imports and exception handling Removed unused import statements from three test classes to clean up the code. Additionally, eliminated the unnecessary throws declaration in `messageArrived` method in `PingServiceTest.java`. --- .../data/agrirouter/test/fixture/FarmingSoftwareFixture.java | 1 - .../data/agrirouter/test/messaging/mqtt/PingServiceTest.java | 2 +- .../messaging/rest/HealthCheckForEndpointsByPollingTest.java | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java index 51b8a5ac..c04a6559 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/fixture/FarmingSoftwareFixture.java @@ -13,7 +13,6 @@ import org.junit.jupiter.api.Test; import java.io.IOException; -import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertNotNull; diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java index 58ad5457..4ae56dfa 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/mqtt/PingServiceTest.java @@ -75,7 +75,7 @@ public void connectionLost(Throwable throwable) { } @Override - public void messageArrived(String s, MqttMessage mqttMessage) throws Exception { + public void messageArrived(String s, MqttMessage mqttMessage) { var payload = StringUtils.toEncodedString(mqttMessage.getPayload(), StandardCharsets.UTF_8); final var fetchMessageResponse = new Gson().fromJson(payload, FetchMessageResponse.class); final var decodedMessageResponse = decodeMessageService.decode(fetchMessageResponse.getCommand().getMessage()); diff --git a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java index 03041db3..cb8ccca8 100644 --- a/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java +++ b/agrirouter-sdk-java-tests/src/test/java/com/dke/data/agrirouter/test/messaging/rest/HealthCheckForEndpointsByPollingTest.java @@ -1,7 +1,6 @@ package com.dke.data.agrirouter.test.messaging.rest; import com.dke.data.agrirouter.api.cancellation.DefaultCancellationToken; -import com.dke.data.agrirouter.api.exception.UnauthorizedRequestException; import com.dke.data.agrirouter.api.service.messaging.http.FetchMessageService; import com.dke.data.agrirouter.impl.messaging.rest.FetchMessageServiceImpl; import com.dke.data.agrirouter.impl.messaging.rest.MessageFetcher; From b0832697c3239ed3678c79d84c8cf819cde4a8fd Mon Sep 17 00:00:00 2001 From: Sascha Doemer Date: Tue, 20 Aug 2024 11:43:45 +0200 Subject: [PATCH 15/16] Update project version to 3.3.0 Bump the parent project and all sub-modules from version 3.2.1 to 3.3.0. This ensures all modules are aligned with the latest version for consistency. --- agrirouter-sdk-java-api/pom.xml | 2 +- agrirouter-sdk-java-convenience/pom.xml | 2 +- agrirouter-sdk-java-impl/pom.xml | 2 +- agrirouter-sdk-java-tests/pom.xml | 2 +- pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/agrirouter-sdk-java-api/pom.xml b/agrirouter-sdk-java-api/pom.xml index 4c4a2c9b..21f9ca17 100644 --- a/agrirouter-sdk-java-api/pom.xml +++ b/agrirouter-sdk-java-api/pom.xml @@ -6,7 +6,7 @@ com.agrirouter.api agrirouter-sdk-java - 3.2.1 + 3.3.0 AGRIROUTER SDK JAVA - API agrirouter-sdk-java-api diff --git a/agrirouter-sdk-java-convenience/pom.xml b/agrirouter-sdk-java-convenience/pom.xml index 262579ef..c4f68e20 100644 --- a/agrirouter-sdk-java-convenience/pom.xml +++ b/agrirouter-sdk-java-convenience/pom.xml @@ -6,7 +6,7 @@ com.agrirouter.api agrirouter-sdk-java - 3.2.1 + 3.3.0 AGRIROUTER SDK JAVA - CONVENIENCE agrirouter-sdk-java-convenience diff --git a/agrirouter-sdk-java-impl/pom.xml b/agrirouter-sdk-java-impl/pom.xml index e3d5d912..31eccbfa 100644 --- a/agrirouter-sdk-java-impl/pom.xml +++ b/agrirouter-sdk-java-impl/pom.xml @@ -6,7 +6,7 @@ com.agrirouter.api agrirouter-sdk-java - 3.2.1 + 3.3.0 AGRIROUTER SDK JAVA - IMPL agrirouter-sdk-java-impl diff --git a/agrirouter-sdk-java-tests/pom.xml b/agrirouter-sdk-java-tests/pom.xml index 836aa947..5bed6c13 100644 --- a/agrirouter-sdk-java-tests/pom.xml +++ b/agrirouter-sdk-java-tests/pom.xml @@ -5,7 +5,7 @@ agrirouter-sdk-java com.agrirouter.api - 3.2.1 + 3.3.0 4.0.0 AGRIROUTER SDK JAVA - TESTS diff --git a/pom.xml b/pom.xml index bd351b3b..e893425d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.agrirouter.api agrirouter-sdk-java - 3.2.1 + 3.3.0 pom AGRIROUTER SDK JAVA From 22ecc984dde766bf5fec5955825b1f125dcdb45c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sascha=20D=C3=B6mer?= Date: Fri, 1 Nov 2024 13:49:56 +0100 Subject: [PATCH 16/16] Refactor: Change async ping method to throw exception The `sendAsync` method in `PingServiceImpl` now throws a `RuntimeException`, instructing users to use the synchronous method instead. This change ensures clarity on the method's availability and usage. --- .../data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java index 8377883f..b20daf4b 100644 --- a/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java +++ b/agrirouter-sdk-java-impl/src/main/java/com/dke/data/agrirouter/impl/messaging/mqtt/PingServiceImpl.java @@ -54,7 +54,7 @@ public String send(PingParameters parameters) { @Override public MqttAsyncMessageSendingResult sendAsync(PingParameters parameters) { - return null; + throw new RuntimeException("Not implemented, please use the synchronous send method."); } @Override