private CreatePartitionsRequest createCreatePartitionsRequest(short version) {
        CreatePartitionsTopicCollection topics = new CreatePartitionsTopicCollection();
        topics.add(new CreatePartitionsTopic()
                .setName("my_topic")
                .setCount(3)
        );
        topics.add(new CreatePartitionsTopic()
                .setName("my_other_topic")
                .setCount(3)
        );

        CreatePartitionsRequestData data = new CreatePartitionsRequestData()
                .setTimeoutMs(0)
                .setValidateOnly(false)
                .setTopics(topics);

        return new CreatePartitionsRequest(data, version);
    }
Check that all error codes in the response get included in {@link AbstractResponse#errorCounts()}.
clients/src/test/java/org/apache/kafka/common/requests/RequestResponseTest.java