private OffsetFetchRequest createOffsetFetchRequestWithMultipleGroups(short version, boolean requireStable) {
        Map<String, List<TopicPartition>> groupToPartitionMap = new HashMap<>();
        List<TopicPartition> topic1 = singletonList(
            new TopicPartition("topic1", 0));
        List<TopicPartition> topic2 = asList(
            new TopicPartition("topic1", 0),
            new TopicPartition("topic2", 0),
            new TopicPartition("topic2", 1));
        List<TopicPartition> topic3 = asList(
            new TopicPartition("topic1", 0),
            new TopicPartition("topic2", 0),
            new TopicPartition("topic2", 1),
            new TopicPartition("topic3", 0),
            new TopicPartition("topic3", 1),
            new TopicPartition("topic3", 2));
        groupToPartitionMap.put("group1", topic1);
        groupToPartitionMap.put("group2", topic2);
        groupToPartitionMap.put("group3", topic3);
        groupToPartitionMap.put("group4", null);
        groupToPartitionMap.put("group5", null);

        return new OffsetFetchRequest.Builder(
            groupToPartitionMap,
            requireStable,
            false
        ).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