@Test
        void verifyBadService() throws Throwable {
            val request = new MockHttpServletRequest();
            request.setMethod(HttpMethod.POST.name());
            val response = new MockHttpServletResponse();
            val profile = new CommonProfile();
            profile.setClientName(Authenticators.CAS_OAUTH_CLIENT_BASIC_AUTHN);
            profile.setId(SUPPORTING_CLIENT_ID);
            storeProfileIntoSession(request, profile);
            request.setParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.AUTHORIZATION_CODE.getType());
            request.setParameter(OAuth20Constants.REDIRECT_URI, RegisteredServiceTestUtils.CONST_TEST_URL);

            request.setParameter(OAuth20Constants.CODE, nonSupportingServiceTicket.getId());
            assertFalse(validator.validate(new JEEContext(request, response)));
        }
This is {@link OAuth20AuthorizationCodeGrantTypeTokenRequestValidatorTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/support/oauth/validator/token/OAuth20AuthorizationCodeGrantTypeTokenRequestValidatorTests.java