protected override void ExpectResponse(IGetMappingResponse response)
        {
            response.ShouldBeValid();

            var visitor = new TestVisitor();

            response.Accept(visitor);

            visitor.CountsShouldContainKeyAndCountBe("type", 1);
            visitor.CountsShouldContainKeyAndCountBe("join", 1);
            visitor.CountsShouldContainKeyAndCountBe("object", 7);
            visitor.CountsShouldContainKeyAndCountBe("date", 4);
            visitor.CountsShouldContainKeyAndCountBe("text", 18);
            visitor.CountsShouldContainKeyAndCountBe("keyword", 17);
            visitor.CountsShouldContainKeyAndCountBe("ip", 2);
            visitor.CountsShouldContainKeyAndCountBe("number", 7);
            visitor.CountsShouldContainKeyAndCountBe("geo_point", 3);
            visitor.CountsShouldContainKeyAndCountBe("completion", 2);
            visitor.CountsShouldContainKeyAndCountBe("nested", 1);
            visitor.CountsShouldContainKeyAndCountBe("date_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("float_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("integer_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("double_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("long_range", 1);
        }
        protected override void ExpectResponse(IGetMappingResponse response)
        {
            response.ShouldBeValid();

            var visitor = new TestVisitor();

            response.Accept(visitor);

            visitor.CountsShouldContainKeyAndCountBe("type", 1);
            //ranges property is ignored on versions before 5.2.0
            var supportsRanges = TestClient.VersionUnderTestSatisfiedBy(">=5.2.0");

            visitor.CountsShouldContainKeyAndCountBe("object", supportsRanges ? 5 : 4);
            visitor.CountsShouldContainKeyAndCountBe("date", 4);
            visitor.CountsShouldContainKeyAndCountBe("text", 11);
            visitor.CountsShouldContainKeyAndCountBe("keyword", 10);
            visitor.CountsShouldContainKeyAndCountBe("ip", 1);
            visitor.CountsShouldContainKeyAndCountBe("number", 3);
            visitor.CountsShouldContainKeyAndCountBe("geo_point", 2);
            visitor.CountsShouldContainKeyAndCountBe("completion", 2);
            visitor.CountsShouldContainKeyAndCountBe("nested", 1);
            if (supportsRanges)
            {
                visitor.CountsShouldContainKeyAndCountBe("date_range", 1);
                visitor.CountsShouldContainKeyAndCountBe("float_range", 1);
                visitor.CountsShouldContainKeyAndCountBe("integer_range", 1);
                visitor.CountsShouldContainKeyAndCountBe("double_range", 1);
                visitor.CountsShouldContainKeyAndCountBe("long_range", 1);
            }
        }
        protected override void ExpectResponse(IGetMappingResponse response)
        {
            response.IsValid.Should().BeTrue();

            var visitor = new TestVisitor();

            response.Accept(visitor);

            visitor.CountsShouldContainKeyAndCountBe("type", 1);
            visitor.CountsShouldContainKeyAndCountBe("object", 2);
            visitor.CountsShouldContainKeyAndCountBe("date", 4);
            visitor.CountsShouldContainKeyAndCountBe("string", 17);
            visitor.CountsShouldContainKeyAndCountBe("ip", 1);
            visitor.CountsShouldContainKeyAndCountBe("number", 2);
            visitor.CountsShouldContainKeyAndCountBe("geo_point", 2);
            visitor.CountsShouldContainKeyAndCountBe("completion", 2);
            visitor.CountsShouldContainKeyAndCountBe("nested", 1);
        }
        //hide
        private static void AssertVisitedProperies(IGetMappingResponse response)
        {
            var visitor = new TestVisitor();
            var b       = TestClient.Configuration.Random.SourceSerializer;

            response.Accept(visitor);
            visitor.CountsShouldContainKeyAndCountBe("type", 1);
            visitor.CountsShouldContainKeyAndCountBe("text", b ? 19 : 18);
            visitor.CountsShouldContainKeyAndCountBe("keyword", b ? 19 : 18);
            visitor.CountsShouldContainKeyAndCountBe("object", 8);
            visitor.CountsShouldContainKeyAndCountBe("number", 7);
            visitor.CountsShouldContainKeyAndCountBe("ip", 2);
            visitor.CountsShouldContainKeyAndCountBe("geo_point", 3);
            visitor.CountsShouldContainKeyAndCountBe("date", 4);
            visitor.CountsShouldContainKeyAndCountBe("join", 1);
            visitor.CountsShouldContainKeyAndCountBe("completion", 2);
            visitor.CountsShouldContainKeyAndCountBe("date_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("double_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("float_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("integer_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("long_range", 1);
            visitor.CountsShouldContainKeyAndCountBe("nested", 1);
        }