@Test
    void verifyTestAttributeDefns() throws Throwable {
        val service = getSamlRegisteredServiceForTestShib();

        val adaptor = SamlRegisteredServiceMetadataAdaptor
            .get(samlRegisteredServiceCachingMetadataResolver, service, service.getServiceId()).get();

        val buildContext = SamlProfileBuilderContext.builder()
            .samlRequest(getAuthnRequestFor(service))
            .httpRequest(new MockHttpServletRequest())
            .httpResponse(new MockHttpServletResponse())
            .authenticatedAssertion(Optional.of(getAssertion(Map.of("emptyAttributeCol", List.of()))))
            .registeredService(service)
            .adaptor(adaptor)
            .binding(SAMLConstants.SAML2_POST_BINDING_URI)
            .build();

        val statement = samlProfileSamlAttributeStatementBuilder.build(buildContext);
        val attributes = statement.getAttributes();
        assertFalse(attributes.isEmpty());
        assertTrue(attributes.stream().anyMatch(a -> "urn:oid:0.9.2342.19200300.100.1.3".equals(a.getName())));
        assertTrue(attributes.stream().anyMatch(a -> "alias".equals(a.getName())));
        assertTrue(attributes.stream().anyMatch(a -> "common-name".equals(a.getName())));
        assertTrue(attributes.stream().anyMatch(a -> "nickname".equals(a.getName())));
    }
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