@Test
public void nested() throws InvalidKeyPathException {

  Path path = KeyPathParser.parse("$[\"a\"][\"b\"].c");
  Schema schema = SchemaBuilder
      .record("X")
      .fields()
      .name("a")
      .type(SchemaBuilder
          .record("Y")
          .fields()
          .name("b")
          .type(SchemaBuilder.record("Z").fields().name("c").type(Schema.create(Type.STRING)).noDefault().endRecord())
          .noDefault()
          .endRecord())
      .noDefault()
      .endRecord();
  new KeyPathValidator(path, schema).validate();
}