     
     private func mockedResponseFilePath(url: NSURL)->String? {
         
+        return mockedFilePath(mockedResponseFileName(url))
+    }
+    
+    private func mockedResponseHeadersFilePath(url: NSURL)->String? {
+        
+        return mockedFilePath(mockedResponseHeadersFileName(url))
+    }
+    
+    private func mockedFilePath(fileName: String?)->String? {
+        
         let paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true) as NSArray
         let documentsDirectory = paths[0] as? String
         
-        guard let fileName =  mockedResponseFileName(url),
+        guard let fileName =  fileName,
             let filePath = documentsDirectory?.stringByAppendingString("/\(fileName)") else {
                 return nil
         }

    
    private func mockURLForRequestURL(url: NSURL, requestMethod: RequestMethod, mocks: Dictionary<String,AnyObject>) -> NSURL? {
        
        guard let definitionsForMethod = mocks[requestMethod.rawValue] as? Dictionary<String,AnyObject> else {
            fatalError("Couldn't find definitions for request: \(requestMethod) make sure to create a node for it in the plist")
        }

        }
    }
    
    func mockResponse(request: NSURLRequest) -> NSURLResponse? {
        
        let requestMethod = RequestMethod(rawValue: request.HTTPMethod!)!
        
        let mockURL = mockURLForRequestURL(request.URL!, requestMethod: requestMethod, mocks: mocks)
        if mockURL == request.URL {
            return nil
        }
        guard let mockedHeaderFields = mockedHeaderFields(request.URL!, requestMethod: requestMethod, mocks: mocks) else {
            return nil
        }
        var statusCode = 200
        if let statusString = mockedHeaderFields["status"], let responseStatus = Int(statusString) {
            statusCode = responseStatus
        }
        
        let mockedResponse = NSHTTPURLResponse(URL: request.URL!, statusCode: statusCode, HTTPVersion: nil, headerFields: mockedHeaderFields )
        
        return mockedResponse
    }
    
    func recordResponseHeadersForRequest(headers:[NSObject:AnyObject], request: NSURLRequest, response: NSHTTPURLResponse) {
        
        var headersModified : [NSObject:AnyObject] = headers
        headersModified["status"] = "\(response.statusCode)"
        
        recordResponseHeadersDataForRequest(NSKeyedArchiver.archivedDataWithRootObject(headersModified), request: request)
    }
    
    private func mockedHeaderFields(url: NSURL, requestMethod: RequestMethod, mocks: Dictionary<String,AnyObject>)->[String : String]? {
        
        guard let mockedHeaderFieldsURL = mockURLForRequestRestponseURL(url, requestMethod: requestMethod, mocks: mocks) else {
            return nil
        }
        guard let mockedHeaderFieldData = NSData(contentsOfURL: mockedHeaderFieldsURL) else {
            return nil
        }
        guard let mockedHeaderFields = NSKeyedUnarchiver.unarchiveObjectWithData(mockedHeaderFieldData) as? [String : String] else {
            return nil
        }
        return mockedHeaderFields
    }
}

// MARK: File extension
