public void createTopic(final String topic,
                            final int partitions,
                            final int replication,
                            final Map<String, String> topicConfig) throws InterruptedException {
        brokers[0].createTopic(topic, partitions, replication, topicConfig);
        final List<TopicPartition> topicPartitions = new ArrayList<>();
        for (int partition = 0; partition < partitions; partition++) {
            topicPartitions.add(new TopicPartition(topic, partition));
        }
        IntegrationTestUtils.waitForTopicPartitions(brokers(), topicPartitions, TOPIC_CREATION_TIMEOUT);
    }
Create a Kafka topic with the given parameters.

@param topic       The name of the topic.
@param partitions  The number of partitions for this topic.
@param replication The replication factor for (partitions of) this topic.
@param topicConfig Additional topic-level configuration settings.
streams/src/test/java/org/apache/kafka/streams/integration/utils/EmbeddedKafkaCluster.java