private void setReplicationThrottleForPartitions(TopicPartition topicPartition) {
        try (Admin admin = Admin.create(Collections.singletonMap(CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG, clusterInstance.bootstrapServers()))) {
            assertDoesNotThrow(() -> throttleAllBrokersReplication(admin, singletonList(4), 1));
            assertDoesNotThrow(() -> assignThrottledPartitionReplicas(admin, singletonMap(topicPartition, singletonList(4))));
        }
    }
Set broker replication quotas and enable throttling for a set of partitions. This
will override any previous replication quotas, but will leave the throttling status
of other partitions unaffected.
tools/src/test/java/org/apache/kafka/tools/reassign/ReassignPartitionsCommandTest.java