@Test
    void verifyGrantServiceTicketAndValidate() throws Throwable {
        val service = RegisteredServiceTestUtils.getService("eduPersonTest");
        val ctx = CoreAuthenticationTestUtils.getAuthenticationResult(getAuthenticationSystemSupport(), service);
        val ticketGrantingTicket = getCentralAuthenticationService().createTicketGrantingTicket(ctx);
        assertTrue(ticketGrantingTicket.isStateless());
        val serviceTicket = getCentralAuthenticationService().grantServiceTicket(ticketGrantingTicket.getId(), service, ctx);
        assertTrue(serviceTicket.isStateless());

        val validatedAssertion = getCentralAuthenticationService().validateServiceTicket(serviceTicket.getId(), service);
        assertNotNull(validatedAssertion);
        assertTrue(validatedAssertion.isStateless());
        assertEquals(1, validatedAssertion.getChainedAuthentications().size());
        assertTrue(validatedAssertion.getContext().containsKey(Principal.class.getName()));
        assertFalse(validatedAssertion.getContext().containsKey(TicketGrantingTicketImpl.class.getName()));

        val authentication = validatedAssertion.getPrimaryAuthentication();
        assertTrue(authentication.getSuccesses().containsKey(SimpleTestUsernamePasswordAuthenticationHandler.class.getSimpleName()));
        assertTrue(authentication.getAttributes().containsKey(AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS));
        assertTrue(authentication.getAttributes().containsKey(AuthenticationManager.AUTHENTICATION_METHOD_ATTRIBUTE));
        assertTrue(authentication.getAttributes().containsKey(Credential.CREDENTIAL_TYPE_ATTRIBUTE));
        assertEquals("developer", authentication.getPrincipal().getId());
        val attributes = authentication.getPrincipal().getAttributes();
        assertTrue(attributes.containsKey("groupMembership"));
        assertTrue(attributes.containsKey("mail"));
        assertTrue(attributes.containsKey("uid"));
        assertTrue(attributes.containsKey("eduPersonAffiliation"));
        assertTrue(attributes.containsKey("binaryAttribute"));
    }
This is {@link StatelessTicketManagementTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-stateless-ticket-registry/src/test/java/org/apereo/cas/StatelessTicketManagementTests.java