diff --git a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/NotificationsEDCFacade.java b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/NotificationsEDCFacade.java index a06fa3278c..0795523948 100644 --- a/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/NotificationsEDCFacade.java +++ b/tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/domain/base/service/NotificationsEDCFacade.java @@ -154,14 +154,6 @@ private CatalogItem getCatalogItem(final NotificationMessage notification, final .build()) .build() ).stream() - .filter(catalogItem -> { - log.info("-- catalog item check --"); - log.info("Item {}: {}", catalogItem.getItemId(), catalogItem); - boolean isValid = policyCheckerService.isValid(catalogItem.getPolicy(), notification.getSendTo() - ); - log.info("IsValid : {}", isValid); - return isValid; - }) .findFirst() .orElseThrow(); } catch (Exception e) { diff --git a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NotificationsEDCFacadeTest.java b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NotificationsEDCFacadeTest.java index ce1a91d3e8..a1b10b2206 100644 --- a/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NotificationsEDCFacadeTest.java +++ b/tx-backend/src/test/java/org/eclipse/tractusx/traceability/infrastructure/edc/blackbox/NotificationsEDCFacadeTest.java @@ -82,7 +82,6 @@ void givenCorrectInvestigationMessageButSendRequestThrowsException_whenStartEdcT final String idsPath = "/api/v1/dsp"; when(edcProperties.getIdsPath()).thenReturn(idsPath); when(edcCatalogFacade.fetchCatalogItems(any())).thenReturn(List.of(catalogItem)); - when(policyCheckerService.isValid(null, null)).thenReturn(true); when(contractNegotiationService.negotiate(receiverEdcUrl + idsPath, catalogItem, null, null)) .thenReturn(NegotiationResponse.builder().contractAgreementId(agreementId).build()); when(endpointDataReference.getEndpoint()).thenReturn("endpoint"); @@ -111,7 +110,6 @@ void givenCorrectInvestigationMessageButNegotiateContractAgreementHasNoCatalogIt final String idsPath = "/api/v1/dsp"; when(edcProperties.getIdsPath()).thenReturn(idsPath); when(edcCatalogFacade.fetchCatalogItems(any())).thenReturn(List.of(catalogItem)); - when(policyCheckerService.isValid(null, null)).thenReturn(true); when(contractNegotiationService.negotiate(receiverEdcUrl + idsPath, catalogItem, null, null)) .thenReturn(null);