public void CreateNewDish_Success_Result() { var createNewDishRequestModel = new Create.Command(); Mediator.Setup(x => x.Send(It.IsAny <Create.Command>(), new CancellationToken())). ReturnsAsync(ResponseWrapper <Create> .GetInstance((int)HttpStatusCode.OK, null, true, null)); DishesController.SetMediatrForTest(Mediator.Object); //Action var result = DishesController.Create(createNewDishRequestModel); //Assert Assert.IsType <Task <ActionResult <ResponseWrapper <Create> > > >(result); }