use of org.restlet.ext.servlet.internal.ServletCall in project OpenAM by OpenRock.
the class RestletRealmRouterTest method setUpRequest.
private Request setUpRequest(HttpServletRequest httpRequest, SSOToken adminToken) {
HttpRequest request = generateRequest();
ServletCall serverCall = mock(ServletCall.class);
given(request.getHttpCall()).willReturn(serverCall);
given(serverCall.getRequest()).willReturn(httpRequest);
Reference reference = mock(Reference.class);
given(request.getResourceRef()).willReturn(reference);
Form queryForm = mock(Form.class);
given(reference.getQueryAsForm()).willReturn(queryForm);
Reference baseReference = mock(Reference.class);
given(reference.getBaseRef()).willReturn(baseReference);
given(baseReference.toString()).willReturn("The base url");
given(coreWrapper.getAdminToken()).willReturn(adminToken);
return request;
}
Aggregations