public void Validate_returns_JsonResult()
        {
            var viewModel = new PostViewModel();
            var mockValidator = new Mock<ICodeValidator>();
            var repository = Mock.Of<IPostRepository>();

            mockValidator.Setup(x => x.GetCompilationErrors(It.IsAny<Post>()));

            var controller = new HomeController(repository, mockValidator.Object);

            var result = controller.Validate(viewModel) as JsonResult;

            Assert.NotNull(result);
            mockValidator.Verify(x => x.GetCompilationErrors(It.IsAny<Post>()), Times.Once());
        }