@Nullable
  @Override
  public GenericRow decode(byte[] payload, GenericRow destination) {
    try {
      destination = (GenericRow) _decodeMethod.invoke(null, payload, destination);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
    return destination;
  }
@Test
  public void testNestedMessageClass()
      throws Exception {
    ProtoBufCodeGenMessageDecoder messageDecoder = setupDecoder("complex_types.jar",
        "org.apache.pinot.plugin.inputformat.protobuf.ComplexTypes$TestMessage$NestedMessage",
        ImmutableSet.of(NESTED_STRING_FIELD, NESTED_INT_FIELD));

    ComplexTypes.TestMessage.NestedMessage nestedMessage =
        ComplexTypes.TestMessage.NestedMessage.newBuilder().setNestedStringField("hello").setNestedIntField(42).build();

    GenericRow destination = new GenericRow();
    messageDecoder.decode(nestedMessage.toByteArray(), destination);

    assertNotNull(destination.getValue(NESTED_STRING_FIELD));
    assertNotNull(destination.getValue(NESTED_INT_FIELD));

    assertEquals(destination.getValue(NESTED_STRING_FIELD), "hello");
    assertEquals(destination.getValue(NESTED_INT_FIELD), 42);
  }