public async Task Handle_WhenCouldNotObtainReadableText_ReturnsFailedResponse()
        {
            const string expectedError      = "Expected error message";
            const string expectedInnerError = "Expected error message inner";

            _readableTextRepository.Setup(m => m.GetRandomAsync(It.IsAny <string>()))
            .ThrowsAsync(new InvalidOperationException(expectedError, new Exception(expectedInnerError)));

            var handler = new GetRandomReadableTextQueryHandler(_readableTextRepository.Object);
            var actual  = await handler.Handle(new GetRandomReadableTextQuery(), CancellationToken.None);

            Assert.False(actual.IsSuccessful);
            Assert.Equal(2, actual.Errors.Count);
            Assert.Equal(expectedError, actual.Errors[0].Message);
            Assert.Equal(expectedInnerError, actual.Errors[1].Message);
        }
        public async Task Handle_WhenObtainedReadableText_ReturnsSuccessfulResponse()
        {
            var expectedText = new ReadableText
            {
                Adverb = new Adverb {
                    Value = "Adv"
                },
                Adjective = new Adjective {
                    Value = "Adj"
                },
                Noun = new Noun {
                    Value = "Nou"
                },
            };

            _readableTextRepository.Setup(m => m.GetRandomAsync(It.IsAny <string>()))
            .ReturnsAsync(expectedText);

            var handler = new GetRandomReadableTextQueryHandler(_readableTextRepository.Object);
            var actual  = await handler.Handle(new GetRandomReadableTextQuery(), CancellationToken.None);

            Assert.True(actual.IsSuccessful);
            Assert.Equal("AdvAdjNou", actual.Text);
        }