Add integration test for CodeReviewPrompts #4
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.



Add integration test for CodeReviewPrompts
Summary
Added a new integration test
CodeReviewPromptsITthat tests the code review prompt functionality via the MCPprompts/getendpoint. This is the first integration test for prompts in the codebase - all previous integration tests were for tools only.The test follows the existing pattern established by
HelloToolIT, using Spring Boot's@SpringBootTestandMockMvcto send JSON-RPC 2.0 requests to the/mcpendpoint. It verifies that the prompt can be retrieved with the correct namereview-codeand that the response contains the expected prompt structure.Review & Testing Checklist for Human
prompts/getrequest to/mcpendpoint with the same payload to confirm the actual API response matches the test assertions (especially$.result.messages[0].roleand$.result.messages[0].content.type)prompts/listendpointprompts/getmethod uses the correct parameter structure compared totools/callDiagram
%%{ init : { "theme" : "default" }}%% graph TB HelloToolIT["HelloToolIT.java<br/>(existing pattern)"]:::context CodeReviewPromptsIT["CodeReviewPromptsIT.java<br/>(new integration test)"]:::major-edit CodeReviewPrompts["CodeReviewPrompts.java<br/>(class under test)"]:::context McpEndpoint["/mcp endpoint<br/>(JSON-RPC API)"]:::context McpPromptsCapability["McpPromptsCapability.java<br/>(prompts/get handler)"]:::context HelloToolIT -.->|"pattern reference"| CodeReviewPromptsIT CodeReviewPromptsIT -->|"prompts/get request"| McpEndpoint McpEndpoint -->|"routes to"| McpPromptsCapability McpPromptsCapability -->|"invokes"| CodeReviewPrompts CodeReviewPrompts -->|"GetPromptResult"| McpPromptsCapability subgraph Legend L1[Major Edit]:::major-edit L2[Minor Edit]:::minor-edit L3[Context/No Edit]:::context end classDef major-edit fill:#90EE90 classDef minor-edit fill:#87CEEB classDef context fill:#FFFFFFNotes
@Promptannotation in the CodeReviewPrompts classdef hello():\n print('Hello, world!')