@Test
    void verifyPopulator() {
        val credentials = new UsernamePasswordCredential();
        credentials.getCustomFields().put("field1", "value1");
        credentials.getCustomFields().put("field2", List.of("value2"));

        val builder = CoreAuthenticationTestUtils.getAuthenticationBuilder();
        this.populator.populateAttributes(builder, CoreAuthenticationTestUtils.getAuthenticationTransactionFactory().newTransaction(credentials));
        assertTrue(populator.supports(credentials));

        val auth = builder.build();
        assertNotNull(auth.getAttributes().get("field1"));
        assertNotNull(auth.getAttributes().get("field2"));
    }
This is {@link CredentialCustomFieldsAttributeMetaDataPopulatorTests}.

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