private EndTxnRequest createEndTxnRequest(short version) {
        return new EndTxnRequest.Builder(
            new EndTxnRequestData()
                .setTransactionalId("tid")
                .setProducerId(21L)
                .setProducerEpoch((short) 42)
                .setCommitted(TransactionResult.COMMIT.id)
            ).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