@Test
    void verifyJwtRequest() throws Throwable {
        val registeredService = addRegisteredService();
        val claims = new JWTClaimsSet.Builder().subject("cas")
            .claim("scope", new String[]{"profile"})
            .claim("redirect_uri", REDIRECT_URI)
            .claim("grant_type", OAuth20GrantTypes.CLIENT_CREDENTIALS.getType())
            .claim("client_id", registeredService.getClientId())
            .build();
        val jwt = new PlainJWT(claims);
        val jwtRequest = jwt.serialize();

        val request = new MockHttpServletRequest();
        request.addParameter(OAuth20Constants.REQUEST, jwtRequest);
        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request, new MockHttpServletResponse()));
        val service = strategy.resolveServiceFrom(RegisteredServiceTestUtils.getService("https://example.org?"
            + OAuth20Constants.REQUEST + '=' + jwtRequest));

        assertNotNull(service);
        assertTrue(service.getAttributes().containsKey(OAuth20Constants.CLIENT_ID));
    }
This is {@link OAuth20AuthenticationServiceSelectionStrategyTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/services/OAuth20AuthenticationServiceSelectionStrategyTests.java