@Test
    void verifyDPoPAccessTokenAsJwt() throws Throwable {
        val mockRequest = new MockHttpServletRequest(HttpMethod.GET.name(), CONTEXT + OAuth20Constants.ACCESS_TOKEN_URL);

        val registeredService = getRegisteredService("example", UUID.randomUUID().toString(), "secret");
        servicesManager.save(registeredService);

        val ecJWK = new ECKeyGenerator(Curve.P_256).keyID("1").generate();
        val proofFactory = new DefaultDPoPProofFactory(ecJWK, JWSAlgorithm.ES256);
        val signedProof = proofFactory.createDPoPJWT("POST", new URI(mockRequest.getRequestURL().toString()));

        val dPopIssuer = new DPoPIssuer(new ClientID(registeredService.getClientId()));
        val verifier = new DPoPTokenRequestVerifier(Set.of(JWSAlgorithm.ES256),
            new URI(mockRequest.getRequestURL().toString()), 30, null);
        
        val confirmation = verifier.verify(dPopIssuer, signedProof, null);
        val authentication = CoreAuthenticationTestUtils.getAuthentication("casuser",
            Map.of(OAuth20Constants.DPOP, List.of(signedProof.serialize()),
                OAuth20Constants.DPOP_CONFIRMATION, List.of(confirmation.getValue().toString())));

        val mv = generateAccessTokenResponseAndGetModelAndView(registeredService,
            authentication, OAuth20GrantTypes.AUTHORIZATION_CODE, mockRequest);
        assertTrue(mv.getModel().containsKey(OAuth20Constants.ACCESS_TOKEN));
        assertTrue(mv.getModel().containsKey(OAuth20Constants.TOKEN_TYPE));
        assertEquals(OAuth20Constants.TOKEN_TYPE_DPOP, mv.getModel().get(OAuth20Constants.TOKEN_TYPE));
        val at = mv.getModel().get(OAuth20Constants.ACCESS_TOKEN).toString();
        val jwt = JWTParser.parse(at);
        assertNotNull(jwt);
    }
This is {@link OAuth20DefaultAccessTokenResponseGeneratorTests}.

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