assertTrue((Boolean) expression.getValue(context));
}
@Test
public void testOauthClient() throws Exception {
AuthorizationRequest request = new AuthorizationRequest("foo", Collections.singleton("read"));
request.setResourceIdsAndAuthoritiesFromClientDetails(new BaseClientDetails("foo", "", "",
"client_credentials", "ROLE_CLIENT"));
OAuth2Request clientAuthentication = RequestTokenFactory
.createOAuth2Request(request.getRequestParameters(), request.getClientId(), request.getAuthorities(),
request.isApproved(), request.getScope(), request.getResourceIds(), request.getRedirectUri(),
request.getResponseTypes(), request.getExtensions());
Authentication userAuthentication = null;
OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(clientAuthentication, userAuthentication);
FilterInvocation invocation = new FilterInvocation("/foo", "GET");
Expression expression = handler.getExpressionParser()