expect(request.getContentType()).andStubReturn(OAuth.ContentType.URL_ENCODED);
expect(request.getParameterValues(OAuth.OAUTH_BEARER_TOKEN)).andStubReturn(new String[] {"sometoken"});
expect(request.getParameter(OAuth.OAUTH_VERSION_DIFFER)).andStubReturn("HMAC-SHA1");
replay(request);
try {
new OAuthAccessResourceRequest(request, ParameterStyle.BODY);
fail("Exception expeted");
} catch (OAuthProblemException e) {
Assert.assertTrue(OAuthError.TokenResponse.INVALID_REQUEST.equals(e.getError()));
Assert.assertEquals("Incorrect OAuth version. Found OAuth V1.0.", e.getDescription());
}