protected ModelAndView generateAccessTokenResponse(final OAuthRegisteredService registeredService,
                                                       final Service service,
                                                       final OAuth20TokenGeneratedResult generatedToken,
                                                       final AccessTokenRequestContext tokenRequestContext) {
        val result = OAuth20AccessTokenResponseResult
            .builder()
            .registeredService(registeredService)
            .responseType(OAuth20ResponseTypes.CODE)
            .service(service)
            .generatedToken(generatedToken)
            .responseType(tokenRequestContext.getResponseType())
            .grantType(tokenRequestContext.getGrantType())
            .requestedTokenType(tokenRequestContext.getRequestedTokenType())
            .build();
        return accessTokenResponseGenerator.generate(result);
    }
This is {@link AbstractOAuth20Tests}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-oauth/src/test/java/org/apereo/cas/AbstractOAuth20Tests.java