public async Task Given_Instance_When_UpdateRecordAsync_Invoked_Then_It_Should_Return_Result() { var instance = new Mock <IUrl>(); instance.Setup(p => p.UpdateRecordAsync <UrlResponse>(It.IsAny <DateTimeOffset>(), It.IsAny <Guid?>())).ReturnsAsync(instance.Object); var value = Task.FromResult(instance.Object); var now = DateTimeOffset.UtcNow; var entityId = Guid.NewGuid(); var result = await UrlExtensions.UpdateRecordAsync <UrlResponse>(value, now, entityId).ConfigureAwait(false); result.Should().Be(instance.Object); }