@Override
  public List<Pair<HoodieRecord, Schema>> fullOuterMerge(HoodieRecord older, Schema oldSchema, HoodieRecord newer, Schema newSchema, TypedProperties props) throws IOException {
    // If the new record is not a delete record, then combine the two records.
    if (newer.isDelete(newSchema, props)) {
      return Collections.singletonList(Pair.of(newer, newSchema));
    }
    checkArgument(older.getRecordKey().equals(newer.getRecordKey()), "Record key must be the same for both records");
    checkArgument(oldSchema.equals(newSchema), "Schema must be the same for both records");
    return Arrays.asList(Pair.of(older, oldSchema), Pair.of(newer, newSchema));
  }
@Test
  public void testFullOuterMerge() throws IOException {
    List<HoodieRecord> newRecordList = dataGen.generateInserts("000", 1);
    List<HoodieRecord> updateRecordList = dataGen.generateUpdates("0001", newRecordList);
    HoodieMetadataRecordMerger recordMerger = new HoodieMetadataRecordMerger();
    List<Pair<HoodieRecord, Schema>> mergedRecords = recordMerger.fullOuterMerge(newRecordList.get(0), AVRO_SCHEMA, updateRecordList.get(0), AVRO_SCHEMA, new TypedProperties());
    assertEquals(2, mergedRecords.size());
    assertEquals(updateRecordList.get(0), mergedRecords.get(1).getLeft());
  }