Version implements Comparable<Version> { public Version getNextMajorVersion() { return new Version(semver.incrementMajorVersion()); } Version(int major, int minor, int patch);  Version(int major, int minor, int patch, boolean snapshot);  Version(String version); private  Version(com.github.zafarkhaja.semver.Version semver); int getMajor(); int getMinor(); int getPatch(); boolean isSnapshot(); Version getSnapshot(); Version getNextMajorVersion(); Version getNextMinorVersion(); Version getNextPatchVersion(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); @Override int compareTo(Version other); static final Version DEFAULT; }
@Test public void getNextMajorVersion() { Version version = new Version(1, 2, 3); assertEquals(new Version(2, 0, 0), version.getNextMajorVersion()); }