Collections.<ConfigAttribute> singleton(new SecurityConfig("SCOPE_WRITE"))));
}
@Test(expected = AccessDeniedException.class)
public void testExceptionThrownIfWrongScopesPresent() throws Exception {
OAuth2Request clientAuthentication = RequestTokenFactory.createOAuth2Request("foo", false, Collections.singleton("read"));
Authentication userAuthentication = null;
OAuth2Authentication oAuth2Authentication = new OAuth2Authentication(clientAuthentication, userAuthentication);
assertEquals(
AccessDecisionVoter.ACCESS_DENIED,
voter.vote(oAuth2Authentication, null,