### Question:
RDN implements Comparable<RDN> { boolean addValue(AttributeType type, String name, ByteString value) { int numValues = attributeTypes.length; for (int i=0; i < numValues; i++) { if (attributeTypes[i].equals(type) && attributeValues[i].equals(value)) { return false; } } numValues++; AttributeType[] newTypes = new AttributeType[numValues]; System.arraycopy(attributeTypes, 0, newTypes, 0, attributeTypes.length); newTypes[attributeTypes.length] = type; attributeTypes = newTypes; String[] newNames = new String[numValues]; System.arraycopy(attributeNames, 0, newNames, 0, attributeNames.length); newNames[attributeNames.length] = name; attributeNames = newNames; ByteString[] newValues = new ByteString[numValues]; System.arraycopy(attributeValues, 0, newValues, 0, attributeValues.length); newValues[attributeValues.length] = value; attributeValues = newValues; return true; } @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 public void testAddDuplicateValue() throws Exception { RDN rdn = new RDN(AT_DC, AV_DC_ORG); assertFalse(rdn.addValue(AT_DC, AT_DC.getNameOrOID(), AV_DC_ORG)); }