private LeaveGroupRequest createLeaveGroupRequest(short version) {
        MemberIdentity member = new MemberIdentity().setMemberId("consumer1").setReason("reason: test");
        return new LeaveGroupRequest.Builder("group1", Collections.singletonList(member))
                .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