airajena opened a new pull request, #6264: URL: https://github.com/apache/shenyu/pull/6264
## Related Issue Addresses #5161: [Task] Improve test case coverage ## Description This PR improves test coverage for `VersionUtils` class by adding comprehensive test cases. ## Changes Added 6 new test methods to `VersionUtilsTest.java`: 1. **testGetVersionWithDefaultFallback()** - Tests version retrieval with default fallback 2. **testGetVersionWithNullCodeSource()** - Tests handling of classes without code source 3. **testCheckDuplicateDoesNotThrow()** - Tests checkDuplicate for normal classes 4. **testCheckDuplicateWithCoreClass()** - Tests checkDuplicate for core Java classes 5. **testGetVersionReturnsNonEmptyString()** - Validates version is not empty 6. **testGetVersionWithCustomClassAndDefault()** - Tests custom class with default version ## Testing The tests cover edge cases for: - Classes without manifest version info - Classes with null code sources (core Java classes) - The `checkDuplicate()` method behavior ## Impact - Increases test coverage for `shenyu-common` module - No changes to production code -- 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]
