From 13a23e6f139d9e11090cff0965766053a794df73 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 2 Aug 2024 13:03:54 +0200 Subject: [PATCH] fix(exception-handling): [#841] fix compile error --- .../DiscoveryServiceWiremockSupport.java | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java index 9a7ad8b37..d05f28e4a 100644 --- a/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java +++ b/irs-testing/src/main/java/org/eclipse/tractusx/irs/testing/wiremock/DiscoveryServiceWiremockSupport.java @@ -93,25 +93,23 @@ public static MappingBuilder postDiscoveryFinder200() { public static MappingBuilder postDiscoveryFinder200(final String... discoveryFinderUrls) { return post(urlPathEqualTo(DISCOVERY_FINDER_PATH)).willReturn( - responseWithStatus(STATUS_CODE_OK).withBody(discoveryFinderResponse(edcUrls))); + responseWithStatus(STATUS_CODE_OK).withBody(discoveryFinderResponse(discoveryFinderUrls))); } public static String discoveryFinderResponse(final String... discoveryFinderUrls) { - final String endpoints = Arrays.stream(discoveryFinderUrls) - .map(endpointAddress -> { - final String resourceId = UUID.randomUUID().toString(); - return """ - { - "type": "bpn", - "description": "Service to discover EDC to a particular BPN", - "endpointAddress": "%s", - "documentation": "http://.../swagger/index.html", - "resourceId": "%s" - } - """.formatted(endpointAddress, resourceId); - }) - .collect(Collectors.joining(",")); + final String endpoints = Arrays.stream(discoveryFinderUrls).map(endpointAddress -> { + final String resourceId = UUID.randomUUID().toString(); + return """ + { + "type": "bpn", + "description": "Service to discover EDC to a particular BPN", + "endpointAddress": "%s", + "documentation": "http://.../swagger/index.html", + "resourceId": "%s" + } + """.formatted(endpointAddress, resourceId); + }).collect(Collectors.joining(",")); return """ {