public void Insert_InvalidObjectPassed_ReturnsBadRequest() { var nameMissingItem = new TodoVO() { Id = Guid.Parse("6da0e0a9-143e-466e-b594-4ddb3d0fb5d3"), TaskName = "Dentist" }; _controller.ModelState.AddModelError("Category", "Required"); var badResponse = _controller.Insert(nameMissingItem).Result; Assert.IsType <BadRequestObjectResult>(badResponse); }