VersionUtils { public static boolean isSameVersion(String version1, String version2) { if (version1 == null || version2 == null) { return StringUtils.equals(version1, version2); } return new Semver(version1, LOOSE).equals(new Semver(version2, LOOSE)); }  static boolean isSameVersion(String version1, String version2);  }
@Test public void isSameVersionTest() { assertThat("isSameVersion didn't return the expected return value when called with parameters " + version1 + " and " + version2, isSameVersion(version1, version2), equalTo(expectedResult)); }