private InitializeShareGroupStateResponse createInitializeShareGroupStateResponse() {
        InitializeShareGroupStateResponseData data = new InitializeShareGroupStateResponseData();
        data.setResults(Collections.singletonList(new InitializeShareGroupStateResponseData.InitializeStateResult()
                .setTopicId(Uuid.randomUuid())
                .setPartitions(Collections.singletonList(new InitializeShareGroupStateResponseData.PartitionResult()
                        .setPartition(0)
                        .setErrorCode(Errors.NONE.code())))));
        return new InitializeShareGroupStateResponse(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