     }
 
     var shouldDisconnectImmediately: Bool!
+    static let expectationTimeout = 5.0
 
     override func setUp() {
         super.setUp()

    func testConnect() {
        connectExpectation = XCTestExpectation(description: "connectExpectation")
        socket.connect()
        wait(for: [connectExpectation!], timeout: 1.0)
    }

    func testDisconnect() {
        disconnectExpectation = XCTestExpectation(description: "disconnectExpectation")
        socket.connect()
        wait(for: [disconnectExpectation], timeout: 1.0)
    }

    func testReceiveStringMessage() {
        stringMessageExpectation = XCTestExpectation(description: "stringMessageExpectation")
        socket.connect()
        socket.send(string: "This is a string message!")
        wait(for: [stringMessageExpectation], timeout: 1.0)
    }

    func testReceiveDataMessage() {
        dataMessageExpectation = XCTestExpectation(description: "dataMessageExpectation")
        socket.connect()
        socket.send(data: "This is a data message!".data(using: .utf8)!)
        wait(for: [dataMessageExpectation], timeout: 1.0)
    }

    func testReceivePong() {
        pongExpectation = XCTestExpectation(description: "pongExpectation")
        socket.connect()
        socket.ping()
        wait(for: [pongExpectation], timeout: 1.0)
    }

    func testReceiveError() {

        errorExpectation = XCTestExpectation(description: "errorExpectation")
        socket.connect()
        // TODO: TRIGGER ERROR
        wait(for: [errorExpectation!], timeout: Self.expectationTimeout)
    }

}
