protected OAuthProvider buildProvider(String requestTokenUrl, String accessTokenUrl,
String websiteUrl, boolean mockConnection) throws Exception {
if (mockConnection) {
DefaultOAuthProviderMock provider = new DefaultOAuthProviderMock(requestTokenUrl,
accessTokenUrl, websiteUrl);
provider.mockConnection(OAuth.OAUTH_TOKEN + "=" + TOKEN + "&"
+ OAuth.OAUTH_TOKEN_SECRET + "=" + TOKEN_SECRET);
return provider;
}
return new DefaultOAuthProvider(requestTokenUrl, accessTokenUrl, websiteUrl);
}