@Override
  public Schema getSourceSchema() {
    if (schema == null) {
      try {
        Schema.Parser parser = new Schema.Parser();
        schema = parser.parse(schemaString);
      } catch (Exception e) {
        throw new HoodieSchemaException("Failed to parse schema: " + schemaString, e);
      }

    }
    return schema;
  }
@Test
  public void validateWrappedPrimitiveAndTimestampsAsRecordSchemaGeneration() throws IOException {
    TypedProperties properties = new TypedProperties();
    properties.setProperty(ProtoClassBasedSchemaProviderConfig.PROTO_SCHEMA_CLASS_NAME.key(), Sample.class.getName());
    properties.setProperty(ProtoClassBasedSchemaProviderConfig.PROTO_SCHEMA_WRAPPED_PRIMITIVES_AS_RECORDS.key(), "true");
    properties.setProperty(ProtoClassBasedSchemaProviderConfig.PROTO_SCHEMA_TIMESTAMPS_AS_RECORDS.key(), "true");
    ProtoClassBasedSchemaProvider protoToAvroSchemaProvider = new ProtoClassBasedSchemaProvider(properties, null);
    Schema convertedSchema = protoToAvroSchemaProvider.getSourceSchema();
    Schema.Parser parser = new Schema.Parser();
    Schema expectedSchema = parser.parse(getClass().getClassLoader().getResourceAsStream("schema-provider/proto/sample_schema_wrapped_and_timestamp_as_record.avsc"));
    Assertions.assertEquals(expectedSchema, convertedSchema);
  }