private static AbstractCredential getCredential() {
        return new AbstractCredential() {
            @Serial
            private static final long serialVersionUID = -1746359565306558329L;

            @Override
            public String getId() {
                return UUID.randomUUID().toString();
            }

            @Override
            public CredentialMetadata getCredentialMetadata() {
                return new BasicCredentialMetadata(this);
            }
        };
    }
This is {@link CredentialTests}.

@author Misagh Moayyed
@since 6.3.0
core/cas-server-core-authentication-api/src/test/java/org/apereo/cas/authentication/credential/CredentialTests.java