### Question:
HiveDifferences { @VisibleForTesting static TableAndMetadata replicaTableToTableAndMetadata(Table replicaTable) { return new TableAndMetadata(replicaTable.getParameters().get(SOURCE_TABLE.parameterName()), normaliseLocation(replicaTable.getParameters().get(SOURCE_LOCATION.parameterName())), replicaTable); } private  HiveDifferences(
      ComparatorRegistry comparatorRegistry,
      DiffListener diffListener,
      Table sourceTable,
      Iterator<Partition> sourcePartitionIterator,
      Optional<Table> replicaTable,
      Optional<? extends PartitionFetcher> replicaPartitionFetcher,
      Function<Path, String> checksumFunction,
      int partitionLimit); static Builder builder(DiffListener diffListener); void run();  }### Answer:
@Test public void replicaTableToTableAndMetadata() { Table sourceTable = TestUtils.newTable("sourceDB", "sourceTable"); Table replicaTable = TestUtils.newTable("replicaDB", "replicaTable"); TestUtils.setCircusTrainSourceParameters(sourceTable, replicaTable); TableAndMetadata replicaTableAndMetadata = HiveDifferences.replicaTableToTableAndMetadata(replicaTable); assertThat(replicaTableAndMetadata.getSourceTable(), is("sourceDB.sourceTable")); assertThat(replicaTableAndMetadata.getSourceLocation(), is(sourceTable.getSd().getLocation())); assertThat(replicaTableAndMetadata.getTable(), is(replicaTable)); assertThat(replicaTableAndMetadata.getTable().getDbName(), is("replicaDB")); assertThat(replicaTableAndMetadata.getTable().getTableName(), is("replicaTable")); }