private WriteShareGroupStateRequest createWriteShareGroupStateRequest(short version) {
        WriteShareGroupStateRequestData data = new WriteShareGroupStateRequestData()
                .setGroupId("group")
                .setTopics(Collections.singletonList(new WriteShareGroupStateRequestData.WriteStateData()
                        .setTopicId(Uuid.randomUuid())
                        .setPartitions(Collections.singletonList(new WriteShareGroupStateRequestData.PartitionData()
                                .setPartition(0)
                                .setStateEpoch(0)
                                .setStartOffset(0)
                                .setStateBatches(singletonList(new WriteShareGroupStateRequestData.StateBatch()
                                        .setFirstOffset(0)
                                        .setLastOffset(0)
                                        .setDeliveryState((byte) 0x0)
                                        .setDeliveryCount((short) 0)))))));
        return new WriteShareGroupStateRequest.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