public async Task Connector_TokenExtractor_NullRequiredEndorsements_ShouldFail()
        {
            var configRetriever = new TestConfigurationRetriever();

            configRetriever.EndorsementTable.Add(KeyId, new HashSet <string>()
            {
                RandomEndorsement, ComplianceEndorsement, TestChannelName
            });
            await Assert.ThrowsAsync <ArgumentNullException>(async() => await RunTestCase(configRetriever));
        }
        public async Task Connector_TokenExtractor_RequiredEndorsementsPartiallyPresent_ShouldNotValidate()
        {
            var configRetriever = new TestConfigurationRetriever();

            configRetriever.EndorsementTable.Add(KeyId, new HashSet <string>()
            {
                RandomEndorsement, ComplianceEndorsement, TestChannelName
            });
            await Assert.ThrowsAsync <UnauthorizedAccessException>(async() => await RunTestCase(configRetriever, new string[] { ComplianceEndorsement, "notSatisfiedEndorsement" }));
        }
        public async Task Connector_TokenExtractor_RequiredEndorsementsPresent_ShouldValidate()
        {
            var configRetriever = new TestConfigurationRetriever();

            configRetriever.EndorsementTable.Add(KeyId, new HashSet <string>()
            {
                RandomEndorsement, ComplianceEndorsement, TestChannelName
            });
            var claimsIdentity = await RunTestCase(configRetriever, new string[] { ComplianceEndorsement });

            Assert.True(claimsIdentity.IsAuthenticated);
        }