Add unit tests for ProtobufUtil - #710
Conversation
tristantarrant
left a comment
There was a problem hiding this comment.
Thanks for the contribution !
Most of the calls are invoking thin wrapper overloads, so I don't think they are worth the tests.
Please keep the tests for the following:
- testWriteToNullObject
- testFromEnumClass
- testEstimateSize
- testToByteBuffer / testFromByteBuffer
|
Also, can you create an issue and format the commit message according to the commit rules ? |
6e9833b to
c91399e
Compare
|
Thanks @tristantarrant! Addressed both points:
Ready for another look whenever you have a moment. |
|
Sorry, you need to adjust to the new Jupiter assertion method argument order (the message goes in last position now) |
c91399e to
54f8810
Compare
|
Thanks @tristantarrant! Addressed the Jupiter feedback:
Verified locally under JDK 17: 🤖 Addressed by Claude Code |
tristantarrant
left a comment
There was a problem hiding this comment.
Looks good now, thanks
|
Merged, thanks! |
Additive unit tests for
ProtobufUtil— edge cases and current behavior pinned with explicit assertions. No existing test or production code changed (append-only).Verified green under Java 17 (
mvn -pl core test -Dtest=ProtobufUtilTest→ 59 tests, 0 failures). On this class the additions raise line coverage from 42 to 65/69 lines and the PIT mutation kill-rate from 65 to 109/121 mutants.How this was produced
This PR was generated with an AI-assisted pipeline built around mutation testing (PIT). The pipeline mutates the target class (flipping conditions and changing boundary/edge cases) and runs the existing tests against each mutant. Where a mutant survives (the existing tests do not catch that edge case), it writes a focused test for that case and reruns PIT to confirm the new test actually kills that specific mutant. So every added test is verified to catch a concrete edge case the suite missed before, rather than being speculative or redundant. The change is additive only (no production code modified), and the module builds green under its CI JDK.