public async Task FromJson()
        {
            var context       = new CompareContext();
            var configuration = await GetConfigurationFromMixedAsync(OpenIdConfigData.OpenIdConnectMetadataPingString, expectedException : ExpectedException.NoExceptionExpected);

            configuration = await GetConfigurationFromMixedAsync(OpenIdConfigData.OpenIdConnectMetadataPingLabsJWKSString, expectedException : ExpectedException.NoExceptionExpected);

            IdentityComparer.AreEqual(configuration, OpenIdConfigData.PingLabs, context);

            configuration = await GetConfigurationFromMixedAsync(OpenIdConfigData.JsonAllValues, expectedException : ExpectedException.NoExceptionExpected);

            IdentityComparer.AreEqual(configuration, OpenIdConfigData.FullyPopulatedWithKeys, context);

            // jwt_uri is not reachable
            await GetConfigurationFromTextAsync(OpenIdConfigData.OpenIdConnectMetadataBadUriKeysString, string.Empty, expectedException : ExpectedException.IOException());

            // stream is not well formated
            await GetConfigurationFromTextAsync(OpenIdConfigData.OpenIdConnectMetadataBadFormatString, string.Empty, expectedException : new ExpectedException(typeExpected: typeof(Newtonsoft.Json.JsonReaderException)));

            configuration = await GetConfigurationFromMixedAsync(OpenIdConfigData.OpenIdConnectMetadataSingleX509DataString, expectedException : ExpectedException.NoExceptionExpected);

            IdentityComparer.AreEqual(configuration, OpenIdConfigData.SingleX509Data, context);

            // dnx 5.0 throws a different exception
            // 5.0 - Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException
            // 4.5.1 - System.Security.Cryptography.CryptographicException
            // for now turn off checking for inner
            var ee = ExpectedException.InvalidOperationException(inner: typeof(CryptographicException));

            ee.IgnoreInnerException = true;
            await GetConfigurationFromMixedAsync(OpenIdConfigData.OpenIdConnectMetadataBadX509DataString, expectedException : ee);
            await GetConfigurationFromMixedAsync(OpenIdConfigData.OpenIdConnectMetadataBadBase64DataString, expectedException : ExpectedException.InvalidOperationException(inner: typeof(FormatException)));

            TestUtilities.AssertFailIfErrors(context);
        }