@Test
    void verifyAuthnContextAsAttribute() throws Throwable {
        val service = getSamlRegisteredServiceForTestShib();
        val adaptor = SamlRegisteredServiceMetadataAdaptor
            .get(samlRegisteredServiceCachingMetadataResolver, service, service.getServiceId()).orElseThrow();
        val buildContext = SamlProfileBuilderContext.builder()
            .samlRequest(getAuthnRequestFor(service))
            .httpRequest(new MockHttpServletRequest())
            .httpResponse(new MockHttpServletResponse())
            .authenticatedAssertion(Optional.of(getAssertion(
                Map.of(casProperties.getAuthn().getMfa().getCore().getAuthenticationContextAttribute(),
                    List.of(TestMultifactorAuthenticationProvider.ID)))))
            .registeredService(service)
            .adaptor(adaptor)
            .binding(SAMLConstants.SAML2_POST_BINDING_URI)
            .build();

        val statement = samlProfileSamlAttributeStatementBuilder.build(buildContext);
        val attributes = statement.getAttributes();
        val values = attributes.stream()
            .filter(attr -> "http://schemas.microsoft.com/claims/authnmethodsreferences".equals(attr.getName()))
            .findFirst().orElseThrow();
        assertFalse(values.getAttributeValues().isEmpty());
        val value = (XSAny) values.getAttributeValues().getFirst();
        assertEquals("http://schemas.microsoft.com/claims/multipleauthn", value.getTextContent());
    }
This is {@link SamlProfileSamlAttributeStatementBuilderTests}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp/src/test/java/org/apereo/cas/support/saml/web/idp/profile/builders/attr/SamlProfileSamlAttributeStatementBuilderTests.java