.createOAuth2Request(request.getRequestParameters(), request.getClientId(), request.getAuthorities(),
request.isApproved(), request.getScope(), request.getResourceIds(), request.getRedirectUri(),
request.getResponseTypes(), request.getExtensions());
OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(clientAuthentication, userAuthentication);
MethodInvocation invocation = new SimpleMethodInvocation(this, ReflectionUtils.findMethod(getClass(),
"testOauthClient"));
EvaluationContext context = handler.createEvaluationContext(oAuth2Authentication, invocation);
Expression expression = handler.getExpressionParser()
.parseExpression("#oauth2.clientHasAnyRole('ROLE_CLIENT')");
assertTrue((Boolean) expression.getValue(context));