@Test public void shouldExtractTokenFromOAuthStandardResponse() { String response = "oauth_token=hh5s93j4hdidpola&oauth_token_secret=hdhd0244k9j7ao03"; Token extracted = extractor.extract(response); assertEquals("hh5s93j4hdidpola", extracted.getToken()); assertEquals("hdhd0244k9j7ao03", extracted.getSecret()); }
@Test public void shouldExtractTokenFromResponseWithCallbackConfirmed() { String response = "oauth_token=hh5s93j4hdidpola&oauth_token_secret=hdhd0244k9j7ao03&callback_confirmed=true"; Token extracted = extractor.extract(response); assertEquals("hh5s93j4hdidpola", extracted.getToken()); assertEquals("hdhd0244k9j7ao03", extracted.getSecret()); }