public void post_returns_400_BadRequest_on_validation_exception(
            DocumentModel document,
            ValidationException exception,
            [Frozen]Mock<ICommand<Document>> submitNewCmd,
            DocumentsController sut)
        {
            submitNewCmd.Setup(c => c.Execute(It.IsAny<Envelope<Document>>()))
                        .Throws(exception);

            var result = sut.Post(document);

            result.Should().BeOfType<BadRequestErrorMessageResult>()
                .Which.Message.Should().Be(exception.Message);
        }
        public void put_returns_400_bad_request_on_validation_error(
            TicketModel ticket,
            Guid ticketId,
            ValidationException exception,
            [Frozen]Mock<ICommand<Ticket>> updateCmd,
            TicketsController sut)
        {
            updateCmd.Setup(cmd => cmd.Execute(It.IsAny<Envelope<Ticket>>())).Throws(exception);

            var actual = sut.Put(ticketId, ticket);

            actual.Should().BeOfType<BadRequestErrorMessageResult>();
        }