public IEnumerator SendChatMessageProperly()
    {
        IChatController chatController = Substitute.For <IChatController>();

        chatController.GetEntries().ReturnsForAnyArgs(new List <ChatMessage>());
        InitializeChatWindowController(chatController);

        bool messageWasSent = false;

        System.Action <string, string> messageCallback =
            (type, msg) =>
        {
            if (type == "SendChatMessage" && msg.Contains("test message"))
            {
                messageWasSent = true;
            }
        };

        WebInterface.OnMessageFromEngine  += messageCallback;
        controller.resetInputFieldOnSubmit = false;
        controller.SendChatMessage(new ChatMessage()
        {
            body = "test message", recipient = "testUser"
        });
        Assert.IsTrue(messageWasSent);
        Assert.AreEqual("", controller.view.chatHudView.inputField.text);
        WebInterface.OnMessageFromEngine -= messageCallback;
        yield break;
    }
    public IEnumerator SendChatMessageProperly()
    {
        bool messageWasSent = false;

        System.Action <string, string> messageCallback =
            (type, msg) =>
        {
            if (type == "SendChatMessage" && msg.Contains("test message"))
            {
                messageWasSent = true;
            }
        };

        WebInterface.OnMessageFromEngine  += messageCallback;
        controller.resetInputFieldOnSubmit = false;
        controller.SendChatMessage(new ChatMessage()
        {
            body = "test message", recipient = "testUser"
        });
        Assert.IsTrue(messageWasSent);
        Assert.AreEqual("", controller.view.chatHudView.inputField.text);
        WebInterface.OnMessageFromEngine -= messageCallback;
        yield break;
    }