use of org.forgerock.oauth2.restlet.ExceptionHandler in project OpenAM by OpenRock.
the class TokenEndpointResourceTest method setUp.
@BeforeClass
@SuppressWarnings("unchecked")
public void setUp() {
JacksonRepresentationFactory jacksonRepresentationFactory = new JacksonRepresentationFactory(new ObjectMapper());
requestFactory = mock(OAuth2RequestFactory.class);
accessTokenService = mock(AccessTokenService.class);
OAuth2Representation representation = new OAuth2Representation(null);
exceptionHandler = new ExceptionHandler(representation, null, null, jacksonRepresentationFactory);
hook = mock(TokenRequestHook.class);
tokenEndpointResource = new TokenEndpointResource(requestFactory, accessTokenService, exceptionHandler, CollectionUtils.asSet(hook), jacksonRepresentationFactory);
}
Aggregations