@Test
    void verifySourceWithPrincipal() {
        val res = new DefaultAuthenticationHandlerExecutionResult("Handler1", CoreAuthenticationTestUtils.getPrincipal("casuser"));
        assertTrue(res.getWarnings().isEmpty());
        assertNotNull(res.getCredential());
        assertEquals(res.getCredential().getId(), res.getPrincipal().getId());
    }
This is {@link DefaultAuthenticationHandlerExecutionResultTests}.

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