private ConsumerGroupHeartbeatResponse createConsumerGroupHeartbeatResponse() {
        ConsumerGroupHeartbeatResponseData data = new ConsumerGroupHeartbeatResponseData()
            .setErrorCode(Errors.NONE.code())
            .setThrottleTimeMs(1000)
            .setMemberId("memberid")
            .setMemberEpoch(11)
            .setAssignment(new ConsumerGroupHeartbeatResponseData.Assignment()
                .setTopicPartitions(Arrays.asList(
                    new ConsumerGroupHeartbeatResponseData.TopicPartitions()
                        .setTopicId(Uuid.randomUuid())
                        .setPartitions(Arrays.asList(0, 1, 2)),
                    new ConsumerGroupHeartbeatResponseData.TopicPartitions()
                        .setTopicId(Uuid.randomUuid())
                        .setPartitions(Arrays.asList(3, 4, 5))
                ))
            );
        return new ConsumerGroupHeartbeatResponse(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