Mocking + Testing of the websocket object.