@Test
        void verifyAccessTokenAsJwt() throws Throwable {
            val registeredService = getRegisteredService(UUID.randomUUID().toString(), "secret", new LinkedHashSet<>());
            registeredService.setJwtAccessToken(true);
            servicesManager.save(registeredService);

            val mv = generateAccessTokenResponseAndGetModelAndView(registeredService);
            assertTrue(mv.getModel().containsKey(OAuth20Constants.ACCESS_TOKEN));

            val at = mv.getModel().get(OAuth20Constants.ACCESS_TOKEN).toString();
            val decoded = oauthAccessTokenJwtCipherExecutor.decode(at).toString();
            assertNotNull(decoded);

            val jwt = JwtClaims.parse(decoded);
            assertNotNull(jwt);

            val ticketId = jwt.getJwtId();
            assertNotNull(ticketId);
            assertNotNull(ticketRegistry.getTicket(ticketId, OAuth20AccessToken.class));
        }
This is {@link OAuth20DefaultTokenGeneratorTests}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/web/response/accesstoken/OAuth20DefaultTokenGeneratorTests.java