### Question:
HiveDifferences { @VisibleForTesting static PartitionAndMetadata replicaPartitionToPartitionAndMetadata(Partition replicaPartition) { return new PartitionAndMetadata(replicaPartition.getParameters().get(SOURCE_TABLE.parameterName()), normaliseLocation(replicaPartition.getParameters().get(SOURCE_LOCATION.parameterName())), replicaPartition); } 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 replicaPartitionToPartitionAndMetadata() { Partition sourcePartition = TestUtils.newPartition("sourceDB", "sourceTable", "val"); Partition replicaPartition = TestUtils.newPartition("replicaDB", "replicaTable", "val"); TestUtils.setCircusTrainSourceParameters(sourcePartition, replicaPartition); PartitionAndMetadata replicaPartitionAndMetadata = HiveDifferences .replicaPartitionToPartitionAndMetadata(replicaPartition); assertThat(replicaPartitionAndMetadata.getSourceTable(), is("sourceDB.sourceTable")); assertThat(replicaPartitionAndMetadata.getSourceLocation(), is(sourcePartition.getSd().getLocation())); assertThat(replicaPartitionAndMetadata.getPartition(), is(replicaPartition)); assertThat(replicaPartitionAndMetadata.getPartition().getDbName(), is("replicaDB")); assertThat(replicaPartitionAndMetadata.getPartition().getTableName(), is("replicaTable")); }