class SimpleSAML2AttributeConverter implements AttributeConverter {

    /** {@inheritDoc} */
    @Override
    public Object convert(final Object a) {<FILL_FUNCTION_BODY>}
}

        val attribute = (Attribute) a;
        val samlAttribute = new SAML2AuthenticationCredentials.SAMLAttribute();
        samlAttribute.setFriendlyName(attribute.getFriendlyName());
        samlAttribute.setName(attribute.getName());
        samlAttribute.setNameFormat(attribute.getNameFormat());
        attribute.getAttributeValues()
            .stream()
            .map(XMLObject::getDOM)
            .filter(dom -> dom != null && dom.getTextContent() != null)
            .forEach(dom -> samlAttribute.getAttributeValues().add(dom.getTextContent().trim()));
        return samlAttribute;
    
<no_super_class>