{{ message }}
Add unit tests for error handling and authorization checks#11
Closed
devin-ai-integration[bot] wants to merge 1 commit into
Closed
Add unit tests for error handling and authorization checks#11devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
- Add RequestExceptionTest: Tests for error handling with various HTTP status codes (400, 404, 500) - Add LoggingInterceptorTest: Tests for interceptor behavior on success/failure responses including 401, 403, 404, 422, 500 errors - Add SettingsTest: Tests for authorization header generation, token management, and settings population - Add AuthorizationTest: Comprehensive tests for private transaction access, token authorization, scope authorization, and transaction ID validation - Update pom.xml with JUnit 5 and Mockito test dependencies - Add Maven Surefire plugin 3.2.5 for JUnit 5 support Co-Authored-By: Jack <jack.l.killian@gmail.com>
Author
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
This PR adds unit tests to cover error handling and authorization scenarios that were previously missing from the test suite. The changes include:
Also adds necessary test infrastructure: JUnit 5, Mockito dependencies, and Maven Surefire plugin 3.2.5 for JUnit 5 support.
All 37 tests pass locally.
Review & Testing Checklist for Human
RequestExceptionproperly formats error messages from mocked HTTP responses. Confirm this level of testing is sufficient for "error handling for valid transaction IDs" and "authorization checks for commenting on private transactions"Applicationclass methods (callTheApi(),processCallback()) that handle these errors - confirm if integration-level tests are neededRecommended test plan: Run
mvn testlocally to verify all tests pass, then review CI results after merge.Notes
Link to Devin run: https://app.devin.ai/sessions/314afe9bce134296baf3ce994cc049d5
Requested by: Jack (@jack-killian)