private VoteRequest createVoteRequest(short version) {
        VoteRequestData data = new VoteRequestData()
                .setClusterId("clusterId")
                .setTopics(singletonList(new VoteRequestData.TopicData()
                        .setPartitions(singletonList(new VoteRequestData.PartitionData()
                                .setPartitionIndex(0)
                                .setCandidateEpoch(1)
                                .setCandidateId(2)
                                .setLastOffset(3L)
                                .setLastOffsetEpoch(4)))
                        .setTopicName("topic1")));
        return new VoteRequest.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