private ControllerRegistrationRequest createControllerRegistrationRequest(short version) {
        ControllerRegistrationRequestData data = new ControllerRegistrationRequestData().
                setControllerId(3).
                setIncarnationId(Uuid.fromString("qiTdnbu6RPazh1Aufq4dxw")).
                setZkMigrationReady(true).
                setFeatures(new ControllerRegistrationRequestData.FeatureCollection(
                        singletonList(
                                new ControllerRegistrationRequestData.Feature().
                                        setName("metadata.version").
                                        setMinSupportedVersion((short) 1).
                                        setMinSupportedVersion((short) 15)
                        ).iterator()
                )).
                setListeners(new ControllerRegistrationRequestData.ListenerCollection(
                        singletonList(
                                new ControllerRegistrationRequestData.Listener().
                                        setName("CONTROLLER").
                                        setName("localhost").
                                        setPort(9012).
                                        setSecurityProtocol(SecurityProtocol.PLAINTEXT.id)
                        ).iterator()
                ));
        return new ControllerRegistrationRequest(data, 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