public async Task Create() { var command = new CreatePartnerCommand(); _mockMediator.Setup(x => x.Send(command, It.IsAny <CancellationToken>())) .ReturnsAsync(123); var result = await _sut.Create(command); Assert.IsAssignableFrom <OkObjectResult>(result.Result); Assert.AreEqual(123, ((OkObjectResult)result.Result).Value); }