code: public static Entry namedObject(Dn dn) {
          Entry entry = new DefaultEntry(dn);
          try {
              entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConstants.NAMED_OBJECT_OC);
              entry.add(SchemaConstants.CN_ATTRIBUTE, dn.getRdn().getName());
          } catch (LdapException e) {
              throw new LdapRuntimeException(e);
          }
          return entry;
      }
docs: Returns an {@link Entry} having the given {@link Dn}. The attribute type of the Rdn is 'common name'.