### Question:
RDN implements Comparable<RDN> { @Override public int hashCode() { return toNormalizedByteString().hashCode(); } @SuppressWarnings("unchecked")  RDN(AttributeType attributeType, ByteString attributeValue); @SuppressWarnings("unchecked")  RDN(AttributeType attributeType, String attributeName, ByteString attributeValue); @SuppressWarnings("unchecked")  RDN(List<AttributeType> attributeTypes,
             List<String> attributeNames,
             List<ByteString> attributeValues); @SuppressWarnings("unchecked")  RDN(AttributeType[] attributeTypes, String[] attributeNames, ByteString[] attributeValues); static RDN create(AttributeType attributeType, ByteString attributeValue); int getNumValues(); boolean hasAttributeType(AttributeType attributeType); boolean hasAttributeType(String lowerName); AttributeType getAttributeType(int pos); String getAttributeName(int pos); ByteString getAttributeValue(AttributeType attributeType); ByteString getAttributeValue(int pos); boolean isMultiValued(); boolean hasValue(AttributeType type, ByteString value); static RDN decode(String rdnString); RDN duplicate(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); void toString(StringBuilder buffer); ByteStringBuilder toNormalizedByteString(ByteStringBuilder builder); @Override int compareTo(RDN rdn);  }### Answer:
@Test(dataProvider = "createRDNEqualityData") public void testHashCode(String first, String second, int result) throws Exception { RDN rdn1 = RDN.decode(first); RDN rdn2 = RDN.decode(second); int h1 = rdn1.hashCode(); int h2 = rdn2.hashCode(); if (result == 0) { assertEquals(h1, h2, "Hash codes for <" + first + "> and <" + second + "> should be the same."); } else { assertNotEquals(h1, h2, "Hash codes for <" + first + "> and <" + second + "> should be the same."); } }