public async Task Given_Instance_When_ShortenAsync_Invoked_Then_It_Should_Return_Result() { var instance = new Mock <IUrl>(); instance.Setup(p => p.ShortenAsync()).ReturnsAsync(instance.Object); var value = Task.FromResult(instance.Object); var result = await UrlExtensions.ShortenAsync(value).ConfigureAwait(false); result.Should().Be(instance.Object); }