use of com.linkedin.restli.internal.server.filter.FilterChainDispatcher in project rest.li by linkedin.
the class TestRestLiCallback method setUp.
@BeforeTest
protected void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
_filterResponseContextFactory = new RestLiFilterResponseContextFactory(_restRequest, _routingResult, _responseHandler);
when(_routingResult.getContext()).thenReturn(new ResourceContextImpl());
ErrorResponseBuilder errorResponseBuilder = new ErrorResponseBuilder();
FilterChainDispatcher filterChainDispatcher = new FilterChainDispatcherImpl(_routingResult, _methodInvoker, _argumentBuilder);
FilterChainCallback filterChainCallback = new FilterChainCallbackImpl(_routingResult, _responseHandler, _callback, errorResponseBuilder);
_zeroFilterChain = new RestLiFilterChain(null, filterChainDispatcher, filterChainCallback);
_oneFilterChain = new RestLiFilterChain(Arrays.asList(_filter), filterChainDispatcher, filterChainCallback);
_twoFilterChain = new RestLiFilterChain(Arrays.asList(_filter, _filter), filterChainDispatcher, filterChainCallback);
_noFilterRestLiCallback = new RestLiCallback(_filterRequestContext, _filterResponseContextFactory, _zeroFilterChain);
_oneFilterRestLiCallback = new RestLiCallback(_filterRequestContext, _filterResponseContextFactory, _oneFilterChain);
_twoFilterRestLiCallback = new RestLiCallback(_filterRequestContext, _filterResponseContextFactory, _twoFilterChain);
}
Aggregations