@Test
public void nestedMessage() {

  Message message =
      NestedMessage.newBuilder().setFoo(NestedMessage.Foo.newBuilder().setName("lee")).build();
  Function<Message, ?> getter = protobufPath(message.getDescriptorForType(), "$.foo.name");
  assertThat(getter.apply(message), is("lee"));
}