@MethodSource("contextProvider")
    @ParameterizedTest
    void verifyServicePassingWithTicket(final Object subject, final OAuth20TokenExchangeTypes type,
                                        final OAuthRegisteredService registeredService,
                                        final Boolean expectation) throws Throwable {
        request.setParameter(OAuth20Constants.SUBJECT_TOKEN, subject.toString());
        if (subject instanceof final Ticket at) {
            ticketRegistry.addTicket(at);
        }
        request.addParameter(OAuth20Constants.AUDIENCE, UUID.randomUUID().toString());
        request.addParameter(OAuth20Constants.SUBJECT_TOKEN_TYPE, type.getType());
        request.addParameter(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.TOKEN_EXCHANGE.getType());

        servicesManager.save(registeredService);
        assertEquals(expectation, validator.validate(context));
    }
This is {@link OAuth20TokenExchangeGrantTypeTokenRequestValidatorTests}.

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