public async Task CredentialThrows()
        {
            var cred1    = new SimpleMockTokenCredential("scopeA", "tokenA");
            var cred2    = new ExceptionalMockTokenCredential();
            var cred3    = new SimpleMockTokenCredential("scopeB", "tokenB");
            var provider = new AggregateCredential(cred1, cred2, cred3);

            Assert.AreEqual("tokenA", (await provider.GetTokenAsync(new string[] { "scopeA" })).Token);
            Assert.ThrowsAsync <MockException>(async() => await provider.GetTokenAsync(new string[] { "ScopeB" }));
            Assert.ThrowsAsync <MockException>(async() => await provider.GetTokenAsync(new string[] { "ScopeC" }));
        }
        public async Task CredentialSequenceValid()
        {
            var cred1    = new SimpleMockTokenCredential("scopeA", "tokenA");
            var cred2    = new SimpleMockTokenCredential("scopeB", "tokenB");
            var cred3    = new SimpleMockTokenCredential("scopeB", "NotToBeReturned");
            var cred4    = new SimpleMockTokenCredential("scopeC", "tokenC");
            var provider = new AggregateCredential(cred1, cred2, cred3, cred4);

            Assert.AreEqual("tokenA", (await provider.GetTokenAsync(new string[] { "scopeA" })).Token);
            Assert.AreEqual("tokenB", (await provider.GetTokenAsync(new string[] { "scopeB" })).Token);
            Assert.AreEqual("tokenC", (await provider.GetTokenAsync(new string[] { "scopeC" })).Token);
            Assert.IsNull((await provider.GetTokenAsync(new string[] { "scopeD" })).Token);
        }