@Test
public void smallerNested() throws InvalidKeyPathException {

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