public PartitionReplica[] getReplicas(int partitionId) {
        InternalPartition partition = partitions[partitionId];
        return partition != null ? partition.getReplicasCopy() : new PartitionReplica[MAX_REPLICA_COUNT];
    }
@Test
    public void testEquals_whenSingleReplicaIsDifferent() throws Exception {
        PartitionTableView table1 = createRandomPartitionTable();

        InternalPartition[] partitions = extractPartitions(table1);
        PartitionReplica[] replicas = table1.getReplicas(0);
        PartitionReplica replica = replicas[0];
        Address newAddress = new Address(replica.address().getInetAddress(), replica.address().getPort() + 1);
        replicas[0] = new PartitionReplica(newAddress, UuidUtil.newUnsecureUUID());
        partitions[0] = new ReadonlyInternalPartition(replicas, 0, partitions[0].version());

        PartitionTableView table2 = new PartitionTableView(partitions);

        assertNotEquals(table1, table2);
    }