public SerializableFunction<T, Row> getToRowFunction() {
    return toRowFunction;
  }
@Test
  public void testReversedOneOfProtoToRow() throws InvalidProtocolBufferException {
    ProtoDynamicMessageSchema schemaProvider = schemaFromDescriptor(ReversedOneOf.getDescriptor());
    SerializableFunction<DynamicMessage, Row> toRow = schemaProvider.getToRowFunction();
    // equality doesn't work between dynamic messages and other,
    // so we compare string representation
    assertEquals(
        REVERSED_ONEOF_ROW_INT32.toString(),
        toRow.apply(toDynamic(REVERSED_ONEOF_PROTO_INT32)).toString());
    assertEquals(
        REVERSED_ONEOF_ROW_BOOL.toString(),
        toRow.apply(toDynamic(REVERSED_ONEOF_PROTO_BOOL)).toString());
    assertEquals(
        REVERSED_ONEOF_ROW_STRING.toString(),
        toRow.apply(toDynamic(REVERSED_ONEOF_PROTO_STRING)).toString());
    assertEquals(
        REVERSED_ONEOF_ROW_PRIMITIVE.toString(),
        toRow.apply(toDynamic(REVERSED_ONEOF_PROTO_PRIMITIVE)).toString());
  }