public async Task TryUpdateAsyncTest()
        {
            DictionaryChange change = null;
            TransactedConcurrentDictionary <int, string> d = new TransactedConcurrentDictionary <int, string>(
                new Uri("test://mocks", UriKind.Absolute),
                (c) =>
            {
                change = c;
                return(true);
            }
                );

            using (var tx = _stateManager.CreateTransaction())
            {
                Assert.IsFalse((await d.TryUpdateAsync(tx, 1, "Two", "One")));
                Assert.IsTrue(await d.TryAddAsync(tx, 1, "One"));

                using (var tx2 = _stateManager.CreateTransaction())
                {
                    await Assert.ThrowsExceptionAsync <TimeoutException>(
                        async() =>
                    {
                        await d.TryRemoveAsync(tx2, 1, timeout: TimeSpan.FromMilliseconds(20));
                    }
                        );
                }
                await tx.CommitAsync();

                Assert.AreEqual("One", change.Added);
            }

            using (var tx = _stateManager.CreateTransaction())
            {
                Assert.IsFalse((await d.TryUpdateAsync(tx, 1, "Three", "Two")));

                using (var tx2 = _stateManager.CreateTransaction())
                {
                    Assert.IsTrue((await d.TryUpdateAsync(tx, 1, "Two", "One")));
                }
                await tx.CommitAsync();

                Assert.AreEqual("Two", change.Added);
            }
        }