### Question:
Replica implements ReplicaId { @Override public DiskId getDiskId() { return disk; } Replica(Partition partition, Disk disk, ClusterMapConfig clusterMapConfig);   Replica(HardwareLayout hardwareLayout, Partition partition, JSONObject jsonObject); @Override PartitionId getPartitionId(); @Override DataNodeId getDataNodeId(); @Override String getMountPath(); @Override String getReplicaPath(); @Override List<ReplicaId> getPeerReplicaIds(); @Override long getCapacityInBytes(); @Override DiskId getDiskId(); @Override boolean isDown(); @Override boolean isSealed(); @Override JSONObject getSnapshot(); @Override void markDiskDown(); @Override void markDiskUp(); @Override ReplicaType getReplicaType(); ClusterMapConfig getClusterMapConfig(); @Override String toString();  }### Answer:
@Test public void basics() throws JSONException { TestHardwareLayout thl = new TestHardwareLayout("Alpha"); Disk disk = thl.getRandomDisk(); TestReplica replicaA = new TestReplica(thl, disk); assertEquals(replicaA.getDiskId(), disk); TestReplica replicaB = new TestReplica(thl.getHardwareLayout(), getJsonReplica(disk)); assertEquals(replicaB.getDiskId(), disk); }