### Question:
Version { @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + major; result = prime * result + minor; result = prime * result + micro; return result; } private  Version(int major, int minor, int micro); static Version create(int major, int minor, int micro); int getMajor(); int getMinor(); int getMicro(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static final Version DEFAULT; }### Answer:
@Test void testHashCode() { final Version version = Version.create(3, 2, 1); assertHashEquals(version, Version.create(3, 2, 1)); assertHashNotEquals(version, new Object()); assertHashNotEquals(version, Version.create(3, 2, 0)); assertHashNotEquals(version, Version.create(3, 0, 1)); assertHashNotEquals(version, Version.create(0, 2, 1)); assertHashNotEquals(version, Version.create(3, 0, 0)); assertHashNotEquals(version, Version.create(0, 0, 1)); assertHashNotEquals(version, Version.create(0, 0, 0)); }