@Test
    void verifyValid() throws Throwable {
        val credential = new AbstractCredential() {
            @Serial
            private static final long serialVersionUID = -1746359565306558329L;

            @Override
            public String getId() {
                return null;
            }
        };
        val context = mock(ValidationContext.class);
        when(context.getMessageContext()).thenReturn(mock(MessageContext.class));
        assertDoesNotThrow(() -> credential.validate(context));
    }
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