// expect(request.getParameter(OAuth.OAUTH_VERSION_DIFFER)).andStubReturn(null);
// expect(request.getParameterValues(OAuth.OAUTH_BEARER_TOKEN)).andStubReturn(null);
// expect(request.getParameterValues(OAuth.OAUTH_TOKEN)).andStubReturn(null);
replay(request);
try {
BearerQueryOAuthValidator qov = new BearerQueryOAuthValidator();
qov.performAllValidations(request);
Assert.fail("Exception not thrown.");
} catch (OAuthProblemException e) {
org.junit.Assert.assertTrue(OAuthUtils.isEmpty(e.getError()));
Assert.assertEquals("Missing OAuth token.", e.getDescription());
}