private ReplicationMetrics createReplicationMetric(String policyName, Long scheduleId) {
    ReplicationMetrics replicationMetrics = new ReplicationMetrics();
    replicationMetrics.setPolicy(policyName);
    replicationMetrics.setScheduledExecutionId(scheduleId);
    replicationMetrics.setDumpExecutionId(1);
    replicationMetrics.setMetadata("metadata");
    replicationMetrics.setProgress("progress");
    return replicationMetrics;
  }
TestReplicationMetrics for testing replication metrics.
persistence to HMS
standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/client/TestReplicationMetrics.java