@Test
    void verifyFormattedAttrDefn() {
        val service = CoreAuthenticationTestUtils.getRegisteredService();
        try (val store = new DefaultAttributeDefinitionStore()) {
            store.setScope("example.org");
            val defn = DefaultAttributeDefinition.builder()
                .key("eduPersonPrincipalName")
                .attribute("givenName")
                .scoped(true)
                .patternFormat("hello,{0}")
                .build();
            store.registerAttributeDefinition(defn);
            val context = AttributeDefinitionResolutionContext.builder()
                .attributeValues(CollectionUtils.wrap(CoreAuthenticationTestUtils.CONST_USERNAME))
                .principal(CoreAuthenticationTestUtils.getPrincipal())
                .registeredService(service)
                .service(CoreAuthenticationTestUtils.getService())
                .attributes(Map.of())
                .build();
            val values = store.resolveAttributeValues("eduPersonPrincipalName", context);
            assertTrue(values.isPresent());
            assertTrue(values.get().getValue().contains("hello,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