public async Task Update() { var command = new UpdatePartnerCommand() { Id = 123 }; _mockMediator.Setup(x => x.Send(command, It.IsAny <CancellationToken>())) .Returns(Task.FromResult(Unit.Value)); var result = await _sut.Update(command.Id, command); _mockMediator.Verify(x => x.Send(command, It.IsAny <CancellationToken>()), Times.Once); }