public async Task ConsoleMessageHandlerTestWithEmptyMessage()
        {
            var mockInput = new Mock <IUserInput>(MockBehavior.Strict);

            mockInput.Setup(m => m.GetInput()).Returns(string.Empty);
            IUserInput            userInput             = mockInput.Object;
            ConsoleMessageHandler consoleMessageHandler = new ConsoleMessageHandler(userInput);
            await consoleMessageHandler.InitAsync().ConfigureAwait(false);

            var task = Task.Run(async() => await consoleMessageHandler.RunAsync().ConfigureAwait(false));
            await Task.Delay(1000).ConfigureAwait(false);

            Assert.True(consoleMessageHandler.IsRunning);
            mockInput.Verify(m => m.GetInput(), Times.AtLeastOnce);
            await consoleMessageHandler.ShutdownAsync().ConfigureAwait(false);

            task.Wait();
            Assert.False(consoleMessageHandler.IsRunning);
        }
        public async Task ConsoleMessageHandlerTest()
        {
            var mockInput = new Mock <IUserInput>(MockBehavior.Strict);

            mockInput.Setup(m => m.GetInput()).Returns("ping");
            IUserInput            userInput             = mockInput.Object;
            ConsoleMessageHandler consoleMessageHandler = new ConsoleMessageHandler(userInput);

            consoleMessageHandler.MessageReceived += ConsoleMessageHandler_MessageReceived;
            await consoleMessageHandler.InitAsync().ConfigureAwait(false);

            var task = Task.Run(async() => await consoleMessageHandler.RunAsync().ConfigureAwait(false));
            await Task.Delay(50).ConfigureAwait(false);

            consoleMessageHandler.IsRunning.Should().BeTrue();
            mockInput.Verify(m => m.GetInput(), Times.AtLeastOnce);
            await consoleMessageHandler.ShutdownAsync().ConfigureAwait(false);

            task.Wait();
            consoleMessageHandler.IsRunning.Should().BeFalse();
        }