private BrokerRegistrationRequest createBrokerRegistrationRequest(short v) {
        BrokerRegistrationRequestData data = new BrokerRegistrationRequestData()
                .setBrokerId(1)
                .setClusterId(Uuid.randomUuid().toString())
                .setRack("1")
                .setFeatures(new BrokerRegistrationRequestData.FeatureCollection(singletonList(
                        new BrokerRegistrationRequestData.Feature()).iterator()))
                .setListeners(new BrokerRegistrationRequestData.ListenerCollection(singletonList(
                        new BrokerRegistrationRequestData.Listener()).iterator()))
                .setIncarnationId(Uuid.randomUuid())
                .setLogDirs(singletonList(Uuid.fromString("qaJjNJ05Q36kEgeTBDcj0Q")))
                .setPreviousBrokerEpoch(123L);
        return new BrokerRegistrationRequest.Builder(data).build(v);
    }
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