public async Task TestGetOrAddAsync()
        {
            var dict = new Dictionary<string, string>();
            await dict.GetOrAddAsync("x", () => Task.FromResult("a"));
            await dict.GetOrAddAsync("x", () => Task.FromResult("b"));

            dict.Should().Equal(new Dictionary<string, string> {["x"] = "a"});
        }
        public async Task TestGetOrAddAsyncRace()
        {
            var mock1 = new Mock();
            var dict = new Dictionary<string, Mock> {["x"] = mock1};

            var mock2 = new Mock();
            var delayedSource = new TaskCompletionSource<Mock>();
            var task = dict.GetOrAddAsync("x", () => delayedSource.Task);
            delayedSource.SetResult(mock2);
            await task;

            dict.Should().Equal(new Dictionary<string, Mock> {["x"] = mock1});

            mock1.IsDisposed.Should().BeFalse();
            mock2.IsDisposed.Should().BeFalse();
        }