final RouteProcessor defaultRouteProcessor = new DefaultRouteProcessor(consumers, endpointInvoker);
final RouteProcessor paginationHandler = new PaginationHandler(defaultRouteProcessor, pagingInstance, consumers,
endpointInvoker);
final RouteProcessor securityHandler = new SecurityHandler(paginationHandler, securityProviderInstance);
final RouteProcessor errorHandler = new ErrorHandler(securityHandler, endpointInvoker);
routeProcessor = new ResponseHandler(errorHandler, mockResponders.getResponders());
return routeProcessor;
} else {
return routeProcessor;
}
}