new BasicBlobCrypter("abcdefghijklmnop".getBytes()),
getOAuthStore(base),
clock,
createRealCallbackGenerator(),
false);
MakeRequestClient client = makeNonSocialClient("owner", "owner", GADGET_URL);
HttpResponse response = client.sendGet(FakeOAuthServiceProvider.RESOURCE_URL);
assertEquals("", response.getResponseAsString());
client.approveToken("user_data=hello-oauth");
client.setReceivedCallbackUrl("nonsense");
response = client.sendGet(FakeOAuthServiceProvider.RESOURCE_URL);
assertEquals("", response.getResponseAsString());
assertNotNull(response.getMetadata().get("oauthErrorText"));
client.approveToken("user_data=try-again");
response = client.sendGet(FakeOAuthServiceProvider.RESOURCE_URL);
assertEquals("User data is try-again", response.getResponseAsString());
}