From b1d3920482ae21ccb549da610a2454fc1be6d755 Mon Sep 17 00:00:00 2001 From: jhartmann Date: Mon, 6 May 2024 11:31:41 +0200 Subject: [PATCH] feat(edc-client): refactoring after review --- .../tractusx/irs/edc/client/EdcCallbackControllerTest.java | 6 +++--- .../decentral/DecentralDigitalTwinRegistryClientTest.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcCallbackControllerTest.java b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcCallbackControllerTest.java index 05bf20de63..f37cb85bd5 100644 --- a/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcCallbackControllerTest.java +++ b/irs-edc-client/src/test/java/org/eclipse/tractusx/irs/edc/client/EdcCallbackControllerTest.java @@ -39,7 +39,7 @@ class EdcCallbackControllerTest { @Test void shouldStoreAgreementId() { // arrange - String ref = """ + final String ref = """ { "id": "bc916834-61b8-4754-b3e2-1eb041d253c2", "at": 1714645750814, @@ -80,7 +80,7 @@ void shouldStoreAgreementId() { @Test void shouldDoNothingWhenEDRTokenIsInvalid() { // arrange - String ref = """ + final String ref = """ { "id": "bc916834-61b8-4754-b3e2-1eb041d253c2", "at": 1714645750814, @@ -102,7 +102,7 @@ void shouldDoNothingWhenEDRTokenIsInvalid() { @Test void shouldDeserializeCallbackEDR() { // arrange - String callbackEDR = """ + final String callbackEDR = """ { "id": "b4d5d2f6-9da4-4236-864f-2803aeda1f56", "at": 1714647576205, diff --git a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryClientTest.java b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryClientTest.java index 365fa5c5b2..8fb4337300 100644 --- a/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryClientTest.java +++ b/irs-registry-client/src/test/java/org/eclipse/tractusx/irs/registryclient/decentral/DecentralDigitalTwinRegistryClientTest.java @@ -24,7 +24,7 @@ class DecentralDigitalTwinRegistryClientTest { public static final String SHELL_DESCRIPTORS = "/shell-descriptors/{aasIdentifier}"; public static final String LOOKUP_SHELLS = "/lookup/shells"; - RestTemplate restTemplate = mock(RestTemplate.class); + private final RestTemplate restTemplate = mock(RestTemplate.class); private DecentralDigitalTwinRegistryClient client; @BeforeEach @@ -37,7 +37,7 @@ void shouldCallForAssetAdministrationShellDescriptor() { // given final String contractAgreementId = "contractAgreementId"; final String endpointUrl = "url.to.host"; - EndpointDataReference endpointDataReference = endpointDataReference(contractAgreementId, endpointUrl); + final EndpointDataReference endpointDataReference = endpointDataReference(contractAgreementId, endpointUrl); when(restTemplate.exchange(any(), eq(HttpMethod.GET), any(), eq(AssetAdministrationShellDescriptor.class))).thenReturn( ResponseEntity.of(Optional.of(AssetAdministrationShellDescriptor.builder().build()))); @@ -53,7 +53,7 @@ void shouldCallForAssetAdministrationShellDescriptor() { @Test void shouldCallForAllAssetAdministrationShellIdsByAssetLink() { // given - EndpointDataReference endpointDataReference = EndpointDataReference.Builder.newInstance() + final EndpointDataReference endpointDataReference = EndpointDataReference.Builder.newInstance() .endpoint("url.to.host") .contractId("contractId") .id("test1")