     // MARK: - Enabled Tests
     func testConnect() {
         let data = try! NSJSONSerialization.dataWithJSONObject(["CONNECTED\nheart-beat:0,0\nversion:1.1\n\n\0"], options: NSJSONWritingOptions(rawValue: 0))
-        let command = String(data: data, encoding: NSUTF8StringEncoding)!
-        socket.expectedMessage = "a" + command
+        socket.expectedMessage = "a" + String(data: data, encoding: NSUTF8StringEncoding)!
         
         client.connect()
         

    
    func testDisconnect() {
        let data = try! NSJSONSerialization.dataWithJSONObject(["CONNECTED\nheart-beat:0,0\nversion:1.1\n\n\0"], options: NSJSONWritingOptions(rawValue: 0))
        let command = String(data: data, encoding: NSUTF8StringEncoding)!
        socket.expectedMessage = "a" + command
        socket.expectedError = NSError(domain: "com.nogle.surveillance", code: 999, userInfo: nil)
        
        client.disconnect()

    
    func testSubscribeWithError() {
        let data = try! NSJSONSerialization.dataWithJSONObject(["ERROR\nmessage:this is an error\ncontent-length:0\n\n\0"], options: NSJSONWritingOptions(rawValue: 0))
        socket.expectedMessage = "a" + String(data: data, encoding: NSUTF8StringEncoding)!
        
        client.subscribe("/path")
        
        XCTAssert(socket.isMethodCalled, "-writeString method isn't called.")
        XCTAssertNotNil(receivedError, "Received error is empty.")
