                                                   paginated: paginated,
                                                   cachePolicy: cachePolicy,
                                                   headers: headers,
-                                                  stubs: stubs).on(failed: { error in
+                                                  stubs: self.stubs).on(failed: { error in
                                                     if error.hasTokenExpired && self.isAuthenticated {
                                                         //If our error response was because our token expired, then lets tell the delegate
                                                         ServiceLocator.shared.delegate?.authenticationTokenDidExpire()

                        with parameters: RequestParameters = RequestParameters(),
                        paginated: Bool = false,
                        cachePolicy:CacheResponsePolicy = CacheResponsePolicy.default,
                        headers: CustomHTTPHeaders = CustomHTTPHeaders(),
                        stubs: [ServiceStub] = [ServiceStub]()) ->  SignalProducer<[String:Any]?, MSError> {
        
        if let ReactiveSwiftNetworkManager = self.networkManager as? ReactiveSwiftNetworkManager {
            return ReactiveSwiftNetworkManager.request(path: servicePath(for: path),

    }
}

extension StubNetworkManager: ReactiveSwiftNetworkManager {
    
    /// Creates and executes a request using StubNetworkManager in a Reactive form
    ///
    /// - Parameters:
    ///   - path: full path to the URL
    ///   - method: HTTP method, default is GET
    ///   - parameters: URL or body parameters depending on the HTTP method, default is empty
    ///   - paginated: if the request should follow pagination, success only if all pages are completed
    ///   - cachePolicy: specifices the policy to follow for caching responses
    ///   - headers: custom headers that should be attached with this request
    public func request(path: String,
                        method: NetworkingServiceKit.HTTPMethod = .get,
                        with parameters: RequestParameters = RequestParameters(),
                        paginated: Bool = false,
                        cachePolicy:CacheResponsePolicy = CacheResponsePolicy.default,
                        headers: CustomHTTPHeaders = CustomHTTPHeaders(),
                        stubs: [ServiceStub] = [ServiceStub]()) ->  SignalProducer<[String:Any]?, MSError> {
        return SignalProducer { [weak self] observer, lifetime in
            self?.request(path: path,
                          method: method,
                          with: parameters,
                          paginated: paginated,
                          cachePolicy: cachePolicy,
                          headers: headers,
                          stubs: stubs, success: { response in
                            observer.send(value: response)
                            observer.sendCompleted()
            }, failure: { error in
                observer.send(error: error)
            })
        }
    }
    
}

public extension Service {
    
    /// Lets a service execute a request using the default networking client in a Reactive form
