Update Java test classes and methods to work with new code versions after refactoring or modifications. Use when code changes break existing tests due to signature changes, refactoring, or behavior modifications. Takes old and new code versions plus old tests as input, and outputs updated tests that compile and pass against the new code. Handles method signature changes, class refactoring, assertion updates, and mock modifications.
92
88%
Does it follow best practices?
Impact
100%
1.00xAverage score across 3 eval scenarios
Passed
No known issues
Method signature and rename updates
applyDiscount param added
100%
100%
calculateTax renamed to computeTax
100%
100%
computeTax inclusive param
100%
100%
applyDiscount assertion updated
100%
100%
getFinalPrice signature updated
100%
100%
Exception test: negative rate
100%
100%
Exception test: rate above 1
100%
100%
Edge case: zero discount rate
100%
100%
computeTax assertion updated
100%
100%
Tests compile and pass
100%
100%
Optional return type and mock modernization
EmailValidator mock added
100%
100%
Constructor updated
100%
100%
findById mock returns Optional
100%
100%
Not-found mock returns Optional.empty
100%
100%
getUserById result type Optional
100%
100%
int to long in method calls
100%
100%
Optional import added
100%
100%
emailValidator mock setup
100%
100%
Invalid email exception test
100%
100%
Tests compile and pass
100%
100%
Method extraction and dependency injection updates
MessageFormatter mock added
100%
100%
Constructor uses both mocks
100%
100%
formatAlert/Reminder tests removed or replaced
100%
100%
formatter.format mock setup
100%
100%
send channel uses enum
100%
100%
sender.deliver verifies formatted output
100%
100%
sendBatch tests removed
100%
100%
Empty/null message tests retained
100%
100%
formatter not called for blank input
100%
100%
Tests compile and pass
100%
100%
0f00a4f
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.