Skip to content

Feature/remove-notification-controller#1480

Closed
ds-vlisenco wants to merge 35 commits intoeclipse-tractusx:mainfrom
ds-vlisenco:feature/remove-notification-controller
Closed

Feature/remove-notification-controller#1480
ds-vlisenco wants to merge 35 commits intoeclipse-tractusx:mainfrom
ds-vlisenco:feature/remove-notification-controller

Conversation

@ds-vlisenco
Copy link
Copy Markdown

chore: remove deprecated EdcNotificationContractController and integration test

This PR removes the no longer used EDC notification contract REST endpoint and its related integration test.


Changes

  • Deleted obsolete controller:
    tx-backend/src/main/java/org/eclipse/tractusx/traceability/notification/application/contract/EdcNotificationContractController.java

  • Deleted integration test:
    tx-backend/src/test/java/org/eclipse/tractusx/traceability/integration/edc/notificationcontract/EdcNotificationContractsControllerIT.java

  • Verified all test references and endpoint usages (/api/edc/notification/contract) are removed.

  • Left the EdcNotificationContractService in place (still used in internal logic and tests).

  • Retained:

    • CreateNotificationContractRequest
    • CreateNotificationContractResponse

Notes

  • Verified via ./mvnw clean verify
  • No Spring context failures
  • No remaining controller dependencies
  • No breaking changes introduced

Related

Closes #5 — Remove EdcNotificationContractController API Endpoint


Pre-review checks

  • No runtime usage of /api/edc/notification/contract
  • Controller and test fully removed
  • Other dependencies verified
  • CHANGELOG.md updated under [Unreleased]

Added input validation to PolicyServiceImpl#getPolicy to throw IllegalArgumentException
when policy ID is null or blank. This ensures consistent error handling and aligns with
unit test expectations.

Also resolves failing test cases in PolicyServiceImplTest that check for invalid inputs.
Added input validation to PolicyServiceImpl#getPolicy to throw IllegalArgumentException
when policy ID is null or blank. This ensures consistent error handling and aligns with
unit test expectations.

Also resolves failing test cases in PolicyServiceImplTest that check for invalid inputs.
fix: add null checks to PolicyServiceImpl to handle invalid input
Introduced @nested classes to logically group tests by method
Added helper method createPolicyResponse to reduce duplication and simplify test setup
Fixed usage of PolicyResponse.policyId() to match record syntax (instead of incorrect getPolicyId())
Corrected construction of Payload and IrsPolicyResponse based on their actual constructors
Improved test assertions to verify actual field values instead of only presence or size
Preserved existing test coverage for all main methods
license header is provided
feature/policy-unit-test
license header is provided
…neration

feature/automate-test-data-generation
…neration

feature/automate-test-data-generation
…ation' into feature/automate-test-data-generation
…neration

feature/automate-test-data-generation
@ds-vlisenco ds-vlisenco deleted the feature/remove-notification-controller branch June 25, 2025 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant