Search in sources :

Example 1 with OAuth2Utils

use of org.forgerock.openam.oauth2.OAuth2Utils in project OpenAM by OpenRock.

the class DeviceCodeResourceTest method setup.

@BeforeMethod
public void setup() throws Exception {
    MockitoAnnotations.initMocks(this);
    when(request.getMethod()).thenReturn(Method.POST);
    resource = spy(new DeviceCodeResource(tokenStore, mockOAuth2RequestFactory(), clientRegistrationStore, mockProviderSettingsFactory(), baseURLProviderFactory, null, jacksonRepresentationFactory, new OAuth2Utils(jacksonRepresentationFactory)));
    when(resource.getRequest()).thenReturn(request);
}
Also used : OAuth2Utils(org.forgerock.openam.oauth2.OAuth2Utils) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

OAuth2Utils (org.forgerock.openam.oauth2.OAuth2Utils)1 BeforeMethod (org.testng.annotations.BeforeMethod)1