@Test
    void verifyCreateTgtWithWarnings() throws Throwable {
        val context = MockRequestContext.create();

        val authentication = CoreAuthenticationTestUtils.getAuthentication();
        val handlerResult = new DefaultAuthenticationHandlerExecutionResult();
        handlerResult.getWarnings().addAll(CollectionUtils.wrapList(new DefaultMessageDescriptor("some.authn.message")));
        authentication.getSuccesses().putAll(CollectionUtils.wrap("handler", handlerResult));

        prepareRequestContextForAuthentication(context, authentication);
        val tgt = new MockTicketGrantingTicket(authentication);
        getTicketRegistry().addTicket(tgt);
        WebUtils.putTicketGrantingTicketInScopes(context, tgt);
        assertEquals(CasWebflowConstants.TRANSITION_ID_SUCCESS_WITH_WARNINGS, action.execute(context).getId());
    }
This is {@link CreateTicketGrantingTicketActionTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-actions/src/test/java/org/apereo/cas/web/flow/CreateTicketGrantingTicketActionTests.java