 
             context("no data from service") {
                 it("No fail for statuscode 200") {
-                    ExpectResponse.statusCode(200)
+                    ExpectResponse.statusCode(200, service: service)
                 }
 
                 it("No fail for statuscode 201") {
-                    ExpectResponse.statusCode(201)
+                    ExpectResponse.statusCode(201, service: service)
                 }
             }
 
             context("data from service") {
                 it("data returned for statuscode 200") {
-                    ExpectResponse.statusCode(200, data: "data".dataUsingEncoding(NSUTF8StringEncoding))
+                    ExpectResponse.statusCode(200, data: "data".dataUsingEncoding(NSUTF8StringEncoding), service: service)
                 }
 
                 it("data returned for statuscode 201") {
-                    ExpectResponse.statusCode(201, data: "data".dataUsingEncoding(NSUTF8StringEncoding))
+                    ExpectResponse.statusCode(201, data: "data".dataUsingEncoding(NSUTF8StringEncoding), service: service)
                 }
             }
 


            it("Fail for NSError") {
                let nsError = NSError(domain: "tests", code: 101, userInfo: nil)
                checkStatusCodeAndData(nil, urlResponse: nil, error: nsError) { (result: Result<MockModel>) in
                    switch result {
                    case .Failure(let faroError):
                        switch faroError {

}

class ExpectResponse {
    static func statusCode(statusCode: Int, data: NSData? = nil, service: Service) {
        let response = NSHTTPURLResponse(URL: NSURL(), statusCode: statusCode, HTTPVersion: nil, headerFields: nil)
        service.checkStatusCodeAndData(data, urlResponse: response, error: nil) { (result: Result<MockModel>) in
            if let data = data {
                switch result {
                case .Data(_):
