private AssignReplicasToDirsRequest createAssignReplicasToDirsRequest(short version) {
        AssignReplicasToDirsRequestData data = new AssignReplicasToDirsRequestData()
                .setBrokerId(1)
                .setBrokerEpoch(123L)
                .setDirectories(Arrays.asList(
                        new AssignReplicasToDirsRequestData.DirectoryData()
                                .setId(Uuid.randomUuid())
                                .setTopics(singletonList(
                                        new AssignReplicasToDirsRequestData.TopicData()
                                                .setTopicId(Uuid.fromString("qo0Pcp70TdGnAa7YKMKCqw"))
                                                .setPartitions(singletonList(
                                                        new AssignReplicasToDirsRequestData.PartitionData()
                                                                .setPartitionIndex(8)
                                                ))
                                )),
                        new AssignReplicasToDirsRequestData.DirectoryData()
                                .setId(Uuid.randomUuid())
                                .setTopics(singletonList(
                                        new AssignReplicasToDirsRequestData.TopicData()
                                                .setTopicId(Uuid.fromString("yEu11V7HTRGIwm6FDWFhzg"))
                                                .setPartitions(asList(
                                                        new AssignReplicasToDirsRequestData.PartitionData()
                                                                .setPartitionIndex(2),
                                                        new AssignReplicasToDirsRequestData.PartitionData()
                                                                .setPartitionIndex(80)
                                                ))
                                ))
                ));
        return new AssignReplicasToDirsRequest.Builder(data).build(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