@Test
    void verifyLoadWithValidTicket() throws Throwable {
        val tgt = new MockTicketGrantingTicket(UUID.randomUUID().toString());
        ticketRegistry.addTicket(tgt);
        val requestContext = MockRequestContext.create(applicationContext).withUserAgent();
        requestContext.setClientInfo();
        val cookie = ticketGrantingTicketCookieGenerator.addCookie(requestContext.getHttpServletRequest(), requestContext.getHttpServletResponse(), tgt.getId());
        assertNotNull(cookie);
        requestContext.setRequestCookiesFromResponse();
        val context = new JEEContext(requestContext.getHttpServletRequest(), requestContext.getHttpServletResponse());
        val profileManager = new ProfileManager(context, new JEESessionStore());
        profileManager.save(true, new BasicUserProfile(), false);
        val logic = new OAuth20TicketGrantingTicketAwareSecurityLogic(ticketGrantingTicketCookieGenerator, ticketRegistry);
        assertFalse(logic.loadProfiles(new CallContext(context, new JEESessionStore()), profileManager, List.of()).isEmpty());
    }
This is {@link OAuth20TicketGrantingTicketAwareSecurityLogicTests}.

@author Misagh Moayyed
@since 6.5.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/OAuth20TicketGrantingTicketAwareSecurityLogicTests.java