public static Map<String, List<Object>> mergeAttributes(final Map<String, List<Object>> currentAttributes,
                                                            final Map<String, List<Object>> attributesToMerge) {
        val merger = new MultivaluedAttributeMerger();
        merger.setDistinctValues(true);
        return mergeAttributes(currentAttributes, attributesToMerge, merger);
    }
Merge attributes map.

@param currentAttributes the current attributes
@param attributesToMerge the attributes to merge
@return the map
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/CoreAuthenticationUtils.java