     }
     
     // MARK: - Private Methods
-    private func parseCookies(res: NSHTTPURLResponse) {
-        let fields = res.allHeaderFields as! [String : String]
-        let cookies = NSHTTPCookie.cookiesWithResponseHeaderFields(fields, forURL: res.URL!)
-        NSHTTPCookieStorage.sharedHTTPCookieStorage().setCookies(cookies, forURL: res.URL!, mainDocumentURL: nil)
-        for cookie in cookies {
-            var cookieProperties = [String: AnyObject]()
-            cookieProperties[NSHTTPCookieName] = cookie.name
-            cookieProperties[NSHTTPCookieValue] = cookie.value
-            cookieProperties[NSHTTPCookieDomain] = cookie.domain
-            cookieProperties[NSHTTPCookiePath] = cookie.path
-            cookieProperties[NSHTTPCookieVersion] = NSNumber(integer: cookie.version)
-            cookieProperties[NSHTTPCookieExpires] = NSDate().dateByAddingTimeInterval(31536000)
-            
-            let newCookie = NSHTTPCookie(properties: cookieProperties)
-            NSHTTPCookieStorage.sharedHTTPCookieStorage().setCookie(newCookie!)
-            
-            print("name: \(cookie.name) value: \(cookie.value)")
+    func convertToQueryString(parameters: [String : String]) -> String {
+        var parts = [String]()
+        for (key, value) in parameters {
+            let field = key + "=" + value
+            parts.append(field)
         }
+        return parts.joinWithSeparator("&")
     }
     
 }

    
    private var client: StompClient!
    private var socket: WebSocket!
    private let host = "http://10.1.20.28:8080"
    
    override func setUp() {
        super.setUp()

    
    func stompClient(client: StompClient, didReceivedData data: NSData) {
        let json = try! NSJSONSerialization.JSONObjectWithData(data, options: .AllowFragments)
        XCTAssertNotNil(json["accountId"], "Account Id is empty.")
        XCTAssertEqual(json["accountId"]!, "shawn@nogle.com", "Account Id is wrong.")
        
        client.unsubscribe(destination)
        
