### Question:
PomVersion implements Comparable<PomVersion> { @Override public int compareTo(@NotNull PomVersion pv) { return ComparisonChain.start() .compare(this.major, pv.major) .compare(this.minor, pv.minor) .compare(this.patch, pv.patch) .compareTrueFirst(this.isSnapshot, pv.isSnapshot) .result(); } PomVersion(@JsonProperty("snapshot") boolean isSnapshot,
                    @JsonProperty("major") int major,
                    @JsonProperty("minor") int minor,
                    @JsonProperty("patch") int patch); boolean isSnapshot(); int getMajor(); int getMinor(); int getPatch(); @Override String toString(); static PomVersion parse(final String str); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(@NotNull PomVersion pv);  }### Answer:
@Test public void testComparable() { final PomVersion v1 = new PomVersion(false, 1, 0, 5); final PomVersion v2 = new PomVersion(false, 2, 1, 0); assertTrue(v1.compareTo(v2) < 0); assertTrue(v2.compareTo(v1) > 0); }
@Test public void testComparable_Equals() { final PomVersion v1 = new PomVersion(false, 1, 0, 0); final PomVersion v2 = new PomVersion(false, 1, 0, 0); assertEquals(0, v1.compareTo(v2)); assertEquals(0, v2.compareTo(v1)); }