VersionUtils { public static String getMajor(String version) { return String.valueOf(new Semver(version).getMajor()); }  static Boolean isVersionValid(String version); static Boolean isVersionGreaterOrEquals(String version1, String version2); static String completeIncremental(String version); static String getBaseVersion(String version); static String getMajor(String version); static boolean isRange(String version);  }
@Test public void getMajorTest() { Map<String, String> testInput = getMajorTestInput(); for (String version : testInput.keySet()) { String expectedMajor = testInput.get(version); assertThat("Major is not the expected", getMajor(version), equalTo(expectedMajor)); } }