### Question:
Version implements Comparable<Version> { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null || getClass() != obj.getClass()) { return false; } final Version other = (Version) obj; return major == other.major && minor == other.minor && patch == other.patch; } Version(final int major, final int minor, final int patch); static Version fromString(final String version); @Override String toString(); int getMajor(); int getMinor(); int getPatch(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override int compareTo(final Version version); static Range<Version> createRangeOf(final Version from, final Version to); static final Version NULL; static final String NULL_VERSION_STRING; }### Answer:
@Test public void testEquals() throws Exception { Version version123 = Version.fromString("1.2.3"); Version version0 = Version.fromString("0.0.0"); assertEquals(version123, Version.fromString("1.2.3")); assertTrue(version123.hashCode() == Version.fromString("1.2.3").hashCode()); assertEquals(version0, Version.fromString("0.0.0")); assertTrue(version0.hashCode() == Version.fromString("0.0.0").hashCode()); }