OAuthenticatorV1 implements OAuthenticator { public List<EncodedPair> oauth(OAuthToken accessOAuthToken, MethodType methodType, String url, EncodedPair... parameters) throws InvalidKeyException, NoSuchAlgorithmException, UnsupportedEncodingException { return OAuthsV1.oauth(variantProvider, consumerOAuthToken, accessOAuthToken, methodType, url, parameters); } OAuthenticatorV1(OAuthToken consumerOAuthToken);   OAuthenticatorV1(OAuthToken consumerOAuthToken, VariantProvider variantProvider); List<EncodedPair> oauth(OAuthToken accessOAuthToken, MethodType methodType, String url, EncodedPair... parameters);  }
@Test public void shouldSignWithNoParametersUsingPOST() throws Exception { List<EncodedPair> actualPairs = toTest.oauth(accessToken, POST, URL_NO_QUERY); assertExpectedOAuthPairs("u1OEdJRPW3l/KpXj+/2kR9fPM98=", actualPairs); }
@Test public void shouldSignWithNoParametersUsingGET() throws Exception { List<EncodedPair> actualPairs = toTest.oauth(accessToken, GET, URL_NO_QUERY); assertExpectedOAuthPairs("ZDHmQuapd0+WSUeoRxqf0D5L3wo=", actualPairs); }
@Test public void shouldSignWithParametersUsingPOST() throws Exception { List<EncodedPair> actualPairs = toTest.oauth(accessToken, POST, URL_NO_QUERY, PAIRS); assertExpectedOAuthPairs("GsNK9QyHNkxAFC+I9AWQ5glonkc=", actualPairs); }
@Test public void shouldSignWithParametersUsingGET() throws Exception { List<EncodedPair> actualPairs = toTest.oauth(accessToken, GET, URL_NO_QUERY, PAIRS); assertExpectedOAuthPairs("0XLRn8ZZdVOxrCy62dzsjD+GOjg=", actualPairs); }