public SerializableFunction<T, Row> getToRowFunction() {
    return toRowFunction;
  }
@Test
  public void testNonContiguousOneOfProtoToRow() throws InvalidProtocolBufferException {
    ProtoDynamicMessageSchema schemaProvider =
        schemaFromDescriptor(NonContiguousOneOf.getDescriptor());
    SerializableFunction<DynamicMessage, Row> toRow = schemaProvider.getToRowFunction();
    // equality doesn't work between dynamic messages and other,
    // so we compare string representation
    assertEquals(
        NONCONTIGUOUS_ONEOF_ROW.toString(),
        toRow.apply(toDynamic(NONCONTIGUOUS_ONEOF_PROTO)).toString());
  }