public void TaskToAwaitConversionCompletion() {
        var r = new TaskCompletionSource<int>();
        var rt = r.Task.AsIAwaitable().AsTask();
        var rv = ((Task)r.Task).AsIAwaitable().AsTask();
        
        Task.WhenAny(rv, rt).AssertNotCompleted();
        r.SetResult(1);

        // worked before
        rt.AssertRanToCompletion().AssertEquals(1);
        rv.AssertRanToCompletion();

        // works after
        r.Task.AsIAwaitable().AsTask().AssertRanToCompletion().AssertEquals(1);
        ((Task)r.Task).AsIAwaitable().AsTask().AssertRanToCompletion();
    }
    public void EventuallySetFromTaskGeneric() {
        var r1 = new TaskCompletionSource<int>();
        var r2 = new TaskCompletionSource<int>();
        var t3 = r1.EventuallySetFromTask(r2.Task);
        r1.Task.AssertNotCompleted();
        t3.AssertNotCompleted();

        r2.SetResult(1);
        t3.AssertRanToCompletion();
        r1.Task.AssertRanToCompletion().AssertEquals(1);
        
        r1.EventuallySetFromTask(r2.Task).AssertFailed<InvalidOperationException>();
    }