hashCode() and equals(Object o) Overriding sample Sample overriding implementation and testing of hashCode() and equals(Object o). Fully inspired by Joshua Bloch. (2013). Effective Java (2nd Edition). Addison-Wesley Professional.