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 """ {