private ReadShareGroupStateResponse createReadShareGroupStateResponse() {
        ReadShareGroupStateResponseData data = new ReadShareGroupStateResponseData()
                .setResults(Collections.singletonList(new ReadShareGroupStateResponseData.ReadStateResult()
                        .setTopicId(Uuid.randomUuid())
                        .setPartitions(Collections.singletonList(new ReadShareGroupStateResponseData.PartitionResult()
                                .setPartition(0)
                                .setErrorCode(Errors.NONE.code())
                                .setStateEpoch(0)
                                .setStartOffset(0)
                                .setStateBatches(Collections.singletonList(new ReadShareGroupStateResponseData.StateBatch()
                                        .setFirstOffset(0)
                                        .setLastOffset(0)
                                        .setDeliveryState((byte) 0x0)
                                        .setDeliveryCount((short) 0)))))));
        return new ReadShareGroupStateResponse(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