public void JsonPathExtraction_Theory(string jsonPath, string json, string extractionFunction)
        {
            const string claimName = "PityTheFoolClaim";

            JsonPathClaimExtractionConfig.ExtractValueByJsonPathAsync extractionFunc = null;
            if (extractionFunction?.Equals(nameof(ExtractionFunctions.JsonPathFunc)) ?? false)
            {
                extractionFunc = ExtractionFunctions.JsonPathFunc;
            }
            var config = new ValidJsonPathClaimExtractionConfig(jsonPath, extractionFunc, claimName, ClaimLocation.Body);

            Assert.True(config.ClaimLocation.Equals(ClaimLocation.Body));
            Assert.True(config.ExtractionType.Equals(ExtractionType.JsonPath));
            var result = config.GetClaimAsync(json).Result;

            if (string.IsNullOrEmpty(jsonPath) && result != null)
            {
                Assert.Equal(result.Type, claimName);
                Assert.Equal("{\r\n  \"returnsTheFullThing\": \"withoutHesitation\"\r\n}", result.Value);
            }
            else if (string.IsNullOrEmpty(json))
            {
                Assert.Null(result);
            }
            else if (result != null)
            {
                Assert.Equal(result.Type, claimName);
                Assert.Equal("Person", result.Value);
            }
        }
        public void JsonPathExtraction_NoExtractionFunc()
        {
            const string claimName = "PityTheFoolClaim";
            var          config    = new ValidJsonPathClaimExtractionConfig("$.title", null,
                                                                            claimName, ClaimLocation.Body);

            Assert.True(config.ClaimLocation.Equals(ClaimLocation.Body));
            Assert.True(config.ExtractionType.Equals(ExtractionType.JsonPath));
            try
            {
                config.GetClaimAsync("{\"title\": \"Person\",\"type\": \"LivingThing\"}").Wait();
            }
            catch (AggregateException) { return; }
            Assert.True(false);
        }