public async Task TaskCompleted_TestAsync()
        {
            var authentication = await this.TestContext.LoginRandomAsync(Authority.Admin);

            var userCollection = userContext.GetService(typeof(IUserCollection)) as IUserCollection;
            var user           = await userCollection.GetUserAsync(authentication.ID);

            var password     = user.GetPassword();
            var actualTaskID = Guid.Empty;
            await userContext.AddTaskCompletedEventHandlerAsync(UserContext_TaskCompleted);

            var expectedTaskID = await(user.SetUserNameAsync(authentication, password, RandomUtility.NextName()) as Task <Guid>);

            Assert.AreEqual(expectedTaskID, actualTaskID);
            await userContext.RemoveTaskCompletedEventHandlerAsync(UserContext_TaskCompleted);

            expectedTaskID = await(user.SetUserNameAsync(authentication, password, RandomUtility.NextName()) as Task <Guid>);
            Assert.AreNotEqual(expectedTaskID, actualTaskID);

            void UserContext_TaskCompleted(object sender, TaskCompletedEventArgs e)
            {
                actualTaskID = e.TaskIDs.Single();
            }
        }