Add simple testing method for equals and hashCode.