assertEquals("No credential found", e.getMessage());
}
}
public void testOk() throws RequiresHttpAction {
final OAuthCredentials credentials = (OAuthCredentials) getClient()
.getCredentials(MockWebContext
.create()
.addRequestParameter(BaseOAuth10Client.OAUTH_VERIFIER, VERIFIER)
.addRequestParameter(BaseOAuth10Client.OAUTH_TOKEN, TOKEN)
.addSessionAttribute(getClient().getName() + "#" + BaseOAuth10Client.REQUEST_TOKEN,
new Token(TOKEN, SECRET)));
assertNotNull(credentials);
assertEquals(TOKEN, credentials.getToken());
assertEquals(VERIFIER, credentials.getVerifier());
final Token tokenRequest = credentials.getRequestToken();
assertEquals(TOKEN, tokenRequest.getToken());
assertEquals(SECRET, tokenRequest.getSecret());
}