@Test
    void testAddDistinct() {
        val someAttributes = new HashMap<String, List<Object>>();
        someAttributes.put("attName", CollectionUtils.wrapList("AttValue"));
        someAttributes.put("attName2", CollectionUtils.wrapList("attValue2"));

        val secondAttributes = new HashMap<String, List<Object>>();
        secondAttributes.put("attName", CollectionUtils.wrapList("attValue", "atTvAlue", "attrValue1"));
        secondAttributes.put("attName3", CollectionUtils.wrapList("attValue2"));

        val adder = new MultivaluedAttributeMerger();
        adder.setDistinctValues(true);
        val result = adder.mergeAttributes(someAttributes, secondAttributes);

        val expected = new HashMap<String, List<Object>>();
        expected.put("attName", CollectionUtils.wrapList("AttValue", "attrValue1"));
        expected.put("attName2", CollectionUtils.wrapList("attValue2"));
        expected.put("attName3", CollectionUtils.wrapList("attValue2"));

        assertEquals(expected, result);
    }
This is {@link MultivaluedAttributeMergerTests}.

@author Misagh Moayyed
@since 7.1.0
core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/principal/merger/MultivaluedAttributeMergerTests.java