public void testScopesWithOr() throws Exception {
AuthorizationRequest request = new AuthorizationRequest("foo", Collections.singleton("read"));
request.setResourceIdsAndAuthoritiesFromClientDetails(new BaseClientDetails("foo", "bar", "",
"client_credentials", "ROLE_USER"));
request.setApproved(true);
OAuth2Request clientAuthentication = request.createOAuth2Request();
Authentication userAuthentication = new UsernamePasswordAuthenticationToken("user", "pass",
AuthorityUtils.createAuthorityList("ROLE_USER"));
OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(clientAuthentication, userAuthentication);
FilterInvocation invocation = new FilterInvocation("/foo", "GET");
EvaluationContext context = handler.createEvaluationContext(oAuth2Authentication, invocation);