code: public String getAttribute(final DirContext ctx, final String dn, final String attributeName) throws NamingException {
          final Attributes attributes = ctx.getAttributes(dn);
          return getAttribute(attributes, attributeName);
      }
docs: Retrieves an attribute by its name for the specified dn.
  @param ctx the DirContext to use
  @param dn the distinguished name of the entry to obtain the attribute value for
  @param attributeName the name of the attribute to return
  @return the value of the attribute, or null if not found
  @throws NamingException if an exception is thrown
  @since 1.4.0