public async Task GetMessagesTestAsync()
        {
            var mock = new Mock <IRepository>();

            mock.Setup(p => p.GetMessagesAsync(null)).Returns(GetTestMessages());
            var mockLog = new Mock <ILogger <MessagesController> >();

            var controller = new MessagesController(mock.Object, mockLog.Object);
            var result     = await controller.GetMessagesAsync();

            var expected = await GetTestMessages();

            Assert.Equal(expected.Length, result.Length);
            for (var i = 0; i < expected.Length; i++)
            {
                var expectedMsg = expected[i];
                var resultMsg   = result[i];

                Assert.Equal(expectedMsg.Id, resultMsg.Id);
                Assert.Equal(expectedMsg.Title, resultMsg.Title);
                Assert.Equal(expectedMsg.Text, resultMsg.Text);
                Assert.Equal(expectedMsg.ReceivedAt, resultMsg.ReceivedAt);
            }
        }