OAuthClient oAuthClient = new OAuthClient(new URLConnectionClient());
OAuthClientResponse response = null;
try {
oAuthClient.accessToken(request);
fail("exception expected");
} catch (OAuthProblemException e) {
assertEquals(OAuthError.TokenResponse.INVALID_REQUEST, e.getError());
}