private BeginQuorumEpochResponse createBeginQuorumEpochResponse() {
        BeginQuorumEpochResponseData data = new BeginQuorumEpochResponseData()
                .setErrorCode(Errors.NONE.code())
                .setTopics(singletonList(new BeginQuorumEpochResponseData.TopicData()
                        .setPartitions(singletonList(new BeginQuorumEpochResponseData.PartitionData()
                                .setErrorCode(Errors.NONE.code())
                                .setLeaderEpoch(0)
                                .setLeaderId(1)
                                .setPartitionIndex(2)))));
        return new BeginQuorumEpochResponse(data);
    }
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