private ShareAcknowledgeResponse createShareAcknowledgeResponse() {
        ShareAcknowledgeResponseData data = new ShareAcknowledgeResponseData();
        data.setResponses(singletonList(new ShareAcknowledgeResponseData.ShareAcknowledgeTopicResponse()
                .setTopicId(Uuid.randomUuid())
                .setPartitions(singletonList(new ShareAcknowledgeResponseData.PartitionData()
                        .setPartitionIndex(0)
                        .setErrorCode(Errors.NONE.code())))));
        data.setThrottleTimeMs(345);
        data.setErrorCode(Errors.NONE.code());
        return new ShareAcknowledgeResponse(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