Relates :
|
|
Relates :
|
|
Relates :
|
The code in VersionProps.versionNumbers() could be slightly refactored in order to provide an entry point for unit testing: ... class VersionProps { . . . static List<Integer> parseVersionNumbers(String versionNumber) { // parsing code goes there } static List<Integer> versionNumbers() { return parseVersionNumbers(VERSION_NUMBER); } . . . } ... This would allow writing/adding a unit test for the algorithm implemented in parseVersionNumbers (either using white-box with -Xpatch or using reflection and the proper incantations to invoke parseVersionNumbers from outside the package).