         }
     }
 
-    public init(URL: NSURL, conditionalResponse: ConditionalResponseClosure, behavior: StubBehavior? = nil) {
+    public init(URL: NSURL, behavior: StubBehavior? = nil, conditionalResponse: ConditionalResponseClosure) {
         self.URL = URL
         self.behavior = behavior
         self.conditionalResponse = conditionalResponse


    /// The network failed to send the request, or failed to retrieve a response (eg a timeout).
    case NetworkError(NSError)
}

public struct StubRule {

            completion(response: response, data: data, error: nil)
        case .NetworkError(let error):
            completion(response: nil, data: nil, error: error)
        case .NoStubError:
            fatalError("\(String(URL)) not stubbed yet.")
        }
    }
}

public class GenericStubBackend<Target: TargetType>: StubBackend {
    public override init(defaultBehavior: StubBehavior = .Immediate, defaultResponse: StubResponse = .NoStubError) {
        super.init(defaultBehavior: defaultBehavior, defaultResponse: defaultResponse)
    }

    public func stub(target: Target, behavior: StubBehavior? = nil, response: StubResponse) {
        self.stubTarget(target, behavior: behavior, response: response)
    }

    public func stub(target: Target, behavior: StubBehavior? = nil, conditionalResponse: StubRule.ConditionalResponseClosure) {
        self.stubTarget(target, behavior: behavior, conditionalResponse: conditionalResponse)
    }

    public func removeStub(target: Target) {
