public async Task AuthorizeAsyncInvokesConventionMethod()
        {
            var api               = new NoPermissionApi(serviceProvider);
            var context           = new SubmitContext(api, new ChangeSet());
            var cancellationToken = CancellationToken.None;
            var testClass         = new ConventionBasedChangeSetItemAuthorizer(typeof(NoPermissionApi));
            var result            = await testClass.AuthorizeAsync(context, dataModificationItem, cancellationToken);

            result.Should().BeFalse("AuthorizeAsync should invoke CanInsertObject.");
            api.InvocationCount.Should().Be(1);
        }
        public async Task AuthorizeAsyncInvokesConventionMethod()
        {
            var api     = new NoPermissionApi(serviceProvider);
            var context = new OperationContext(
                api,
                s => new object(),
                "Test",
                true,
                null);
            var cancellationToken = CancellationToken.None;
            var testClass         = new ConventionBasedOperationAuthorizer(typeof(NoPermissionApi));
            var result            = await testClass.AuthorizeAsync(context, cancellationToken);

            result.Should().BeFalse("AuthorizeAsync should invoke CanInsertObject.");
            api.InvocationCount.Should().Be(1);
        }