MavenVersionUtil { public static String calculateReleaseVersion(String version) { if (version.toUpperCase().endsWith(VERSION_QUALIFIER_SNAPSHOT)) { return version.substring(0, version.length() - VERSION_QUALIFIER_SNAPSHOT.length()); } return version; } private  MavenVersionUtil(); static boolean isSnapshot(String version); static String calculateNextSnapshotVersion(String version, VersionUpgradeStrategy upgradeStrategy); static String calculateNextSnapshotVersion(String version); static String calculateReleaseVersion(String version); static boolean isNewerVersion(String version1, String version2); static final String VERSION_QUALIFIER_SNAPSHOT; static final String VERSION_LATEST; }
@Test @UseDataProvider("calculateReleaseVersion") public void testCalculateReleaseVersion(String version, String expectedReleaseVersion) { Assert.assertEquals(expectedReleaseVersion, MavenVersionUtil.calculateReleaseVersion(version)); }