provider.obtainAccessToken(resource, request);
}
@Test
public void testGetAccessTokenRequest() throws Exception {
AccessTokenRequest request = new DefaultAccessTokenRequest();
request.setAuthorizationCode("foo");
request.setStateKey("bar");
request.setPreservedState(new Object());
resource.setAccessTokenUri("http://localhost/oauth/token");
resource.setPreEstablishedRedirectUri("http://anywhere.com");
assertEquals("FOO", provider.obtainAccessToken(resource, request).getValue());
// System.err.println(params);
assertEquals("authorization_code", params.getFirst("grant_type"));