expect(request.getParameter(OAuth.OAUTH_CLIENT_ID)).andStubReturn("test_client");
expect(request.getParameter(OAuth.OAUTH_REDIRECT_URI)).andStubReturn("http://example.com/callback");
expect(request.getParameter(OAuth.OAUTH_SCOPE)).andStubReturn("album photo");
replay(request);
OAuthRequest req = null;
try {
req = new OAuthAuthzRequest(request);
} catch (OAuthProblemException e) {
fail("Exception not expected");
}
Set<String> scopes = req.getScopes();
Assert.assertTrue(findScope(scopes, "album"));
Assert.assertTrue(findScope(scopes, "photo"));
verify(request);