OAuthScheme extends RFC2617Scheme implements AuthScheme { public String authenticate(Credentials credentials, String method, String uri) throws AuthenticationException { return authenticate(credentials, resolveMethod(method, uri)); }  static void register(AbderaClient abderaClient, boolean exclusive); String authenticate(Credentials credentials, String method, String uri); String authenticate(Credentials credentials, HttpMethod method); String getSchemeName(); boolean isComplete(); boolean isConnectionBased();  }
@Test public void testAuthenticate() throws Exception { credentials = new OAuthCredentials("dpf43f3p2l4k3l03", "nnch734d00sl2jdk", "HMAC-SHA1", "http: String header = scheme.authenticate(credentials, "get", "http: assertNotNull(header); String regex = "OAuth realm=\"[^\"]+\", oauth_consumer_key=\"[^\"]+\", " + "oauth_token=\"[^\"]+\", oauth_signature_method=\"[^\"]+\", oauth_signature=\"[^\"]+\", " + "oauth_timestamp=\"[^\"]+\", oauth_nonce=\"[^\"]+\"(, oauth_version=\"[^\"]+\")?"; assertTrue(header.matches(regex)); }