@Test
    void verifyMergeAttributes() {
        val authn = DefaultAuthenticationBuilder.newInstance(CoreAuthenticationTestUtils.getAuthentication(Map.of("cn", List.of("cn1"))))
            .mergeAttributes(Map.of("cn", List.of("cn2")))
            .build();
        assertTrue(authn.containsAttribute("cn"));
        assertEquals(List.of("cn1", "cn2"), authn.getAttributes().get("cn"));
    }
This is {@link DefaultAuthenticationBuilderTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/DefaultAuthenticationBuilderTests.java