expect(request.getMethod()).andStubReturn(OAuth.HttpMethod.POST);
expect(request.getContentType()).andStubReturn(OAuth.ContentType.JSON);
expect(request.getHeader(OAuth.HeaderType.AUTHORIZATION)).andStubReturn(null);
replay(request);
OAuthAccessResourceRequest req = null;
try {
new OAuthAccessResourceRequest(request);
fail("Exception expected");
} catch (OAuthProblemException e) {
Assert.assertEquals("Missing authorization header.", e.getDescription());
}