@Test
    void verifyAttributeDefinitionsAsMap() {
        val service = CoreAuthenticationTestUtils.getRegisteredService();
        try (val store = new DefaultAttributeDefinitionStore()) {
            store.setScope("example.org");
            val defn = DefaultAttributeDefinition.builder()
                .key("cn")
                .scoped(true)
                .name("urn:oid:1.3.6.1.4.1.5923.1.1.1.6")
                .build();
            store.registerAttributeDefinition(defn);
            assertFalse(store.isEmpty());
            val attributes = CoreAuthenticationTestUtils.getAttributes();
            val attrs = store.resolveAttributeValues(attributes.keySet(), attributes,
                CoreAuthenticationTestUtils.getPrincipal(),
                service, CoreAuthenticationTestUtils.getService());
            assertFalse(attrs.isEmpty());
            assertTrue(attrs.containsKey("mail"));
            assertTrue(attrs.containsKey(defn.getName()));
            val values = (List<Object>) attrs.get(defn.getName());
            assertTrue(values.contains("TEST@example.org"));
        }
    }
This is {@link DefaultAttributeDefinitionStoreTests}.

@author Misagh Moayyed
@since 6.2.0
support/cas-server-support-person-directory/src/test/java/org/apereo/cas/DefaultAttributeDefinitionStoreTests.java