public async Task AddDoctorAppointment_Returns_ViewResult_WhenModelNotValid()
        {
            IFixture fixture = new Fixture();

            fixture.Behaviors.Add(new OmitOnRecursionBehavior());
            var model = fixture.Create <AddDoctorAbsenceViewModel>();

            var doctorsController = new DoctorsController(_appService.Object)
            {
                ControllerContext = new ControllerContext
                {
                    HttpContext = new DefaultHttpContext
                    {
                        User = new ClaimsPrincipal(new ClaimsIdentity(new[] { new Claim(ClaimTypes.Name, "user") },
                                                                      "test"))
                    }
                }
            };

            doctorsController.ModelState.AddModelError("errorkey", "Error");

            var action = await doctorsController.AddDoctorAbsence(model);

            Assert.IsInstanceOf <ViewResult>(action);
        }