     }
 
     func webSocketDidReceiveMessage(connection: WebSocketConnection, string: String) {
-        XCTAssertEqual(string, "This is a string message!")
+        XCTAssertEqual(string, Self.stringMessage)
         stringMessageExpectation.fulfill()
     }
 
     func webSocketDidReceiveMessage(connection: WebSocketConnection, data: Data) {
-        XCTAssertEqual(data, "This is a data message!".data(using: .utf8))
+        XCTAssertEqual(data, Self.dataMessage)
         dataMessageExpectation.fulfill()
     }
 }


    var shouldDisconnectImmediately: Bool!
    var receivedPongTimestamps = [Date]()
    static let expectationTimeout = 5.0

    override func setUp() {
        super.setUp()

    func testReceiveStringMessage() {
        stringMessageExpectation = XCTestExpectation(description: "stringMessageExpectation")
        socket.connect()
        socket.send(string: Self.stringMessage)
        wait(for: [stringMessageExpectation], timeout: Self.expectationTimeout)
    }

    func testReceiveDataMessage() {
        dataMessageExpectation = XCTestExpectation(description: "dataMessageExpectation")
        socket.connect()
        socket.send(data: Self.dataMessage)
        wait(for: [dataMessageExpectation], timeout: Self.expectationTimeout)
    }

