zjncs opened a new pull request, #5747:
URL: https://github.com/apache/rocketmq-dashboard/pull/5747

   ### What
   
   `MutationToolHandler` — the base every mutating tool handler extends — had 
no test. This adds `MutationToolHandlerTest` with 4 tests.
   
   ### What is pinned
   
   - the input type comes from the constructor and **`inputType()` is final**, 
so a subclass can never lie about the type the deferred conversion routes on — 
overriding it would desynchronise the whole chain;
   - **`preview()` is the abstract mutation seam** every handler must implement 
(a default no-op body must not sneak in: a silent null preview reads as a 
mutation with no impact);
   - a concrete handler satisfies the whole `ToolHandler` contract through 
`ToolInvocation`: the preview plan and the execution both run off the declared 
input type.
   
   ### Verification
   
   - New tests on unmodified code: **4/4 green**, checkstyle clean (`mvn test 
-Dtest=MutationToolHandlerTest`).
   - Discriminating mutations on `MutationToolHandler`, build result verified 
red each time:
     1. `inputType()` made non-final — red;
     2. `inputType()` returning `Object.class` so the conversion loses the 
typed input — red;
     3. `preview()` given a default null body instead of staying abstract — red.
   - Restored: 4/4 green. Test-only change; no product code touched.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to