@Override
  public Option<Map<String, String>> getMetadata() {
    Map<String, String> metadata = new HashMap<>();
    if (eventTime.isPresent()) {
      metadata.put(METADATA_EVENT_TIME_KEY, String.valueOf(eventTime.get()));
    }
    return metadata.isEmpty() ? Option.empty() : Option.of(metadata);
  }
@Test
  public void testGetEmptyMetadata() {
    GenericRecord record = new GenericData.Record(schema);
    record.put("id", "1");
    record.put("partition", "partition0");
    record.put("ts", 0L);
    record.put("_hoodie_is_deleted", false);
    DefaultHoodieRecordPayload payload = new DefaultHoodieRecordPayload(Option.of(record));
    assertFalse(payload.getMetadata().isPresent());
  }