@Test
        void verifyRequestedClaims() throws Throwable {
            val registeredService = getRegisteredService(UUID.randomUUID().toString(), "secret", new LinkedHashSet<>());
            servicesManager.save(registeredService);
            val mockRequest = new MockHttpServletRequest(HttpMethod.GET.name(), CONTEXT + OAuth20Constants.ACCESS_TOKEN_URL);
            val claims = "\"userinfo\": {\"given_name\": {\"essential\": true}}";
            mockRequest.addParameter(OAuth20Constants.CLAIMS, claims);
            val mv = generateAccessTokenResponseAndGetModelAndView(registeredService,
                RegisteredServiceTestUtils.getAuthentication("casuser"),
                OAuth20GrantTypes.AUTHORIZATION_CODE, mockRequest);
            assertNotNull(mv);
            val id = mv.getModel().get(OAuth20Constants.ACCESS_TOKEN).toString();
            val at = ticketRegistry.getTicket(id, OAuth20AccessToken.class);
            assertTrue(at.getAuthentication().getAttributes().containsKey("given_name"));
        }
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