private FetchSnapshotRequest createFetchSnapshotRequest(short version) {
        FetchSnapshotRequestData data = new FetchSnapshotRequestData()
                .setClusterId("clusterId")
                .setTopics(singletonList(new FetchSnapshotRequestData.TopicSnapshot()
                        .setName("topic1")
                        .setPartitions(singletonList(new FetchSnapshotRequestData.PartitionSnapshot()
                                .setSnapshotId(new FetchSnapshotRequestData.SnapshotId()
                                        .setEndOffset(123L)
                                        .setEpoch(0))
                                .setPosition(123L)
                                .setPartition(0)
                                .setCurrentLeaderEpoch(1)))))
                .setMaxBytes(1000)
                .setReplicaId(2);
        return new FetchSnapshotRequest.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