Replace test WebSocket with MockSocket.