Mock out the websocket connection.