### Question:
RDN implements Comparable<RDN> { public boolean hasAttributeType(AttributeType attributeType) { for (AttributeType t : attributeTypes) { if (t.equals(attributeType)) { return true; } } return false; } @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 testHasAttributeType1() throws Exception { RDN rdn = new RDN(AT_DC, AV_DC_ORG); assertTrue(rdn.hasAttributeType(AT_DC)); assertTrue(rdn.hasAttributeType("dc")); assertTrue(rdn.hasAttributeType(AT_DC.getOID())); assertFalse(rdn.hasAttributeType(AT_CN)); assertFalse(rdn.hasAttributeType("cn")); }