private AlterUserScramCredentialsResponse createAlterUserScramCredentialsResponse() {
        AlterUserScramCredentialsResponseData data = new AlterUserScramCredentialsResponseData()
                .setResults(singletonList(new AlterUserScramCredentialsResponseData.AlterUserScramCredentialsResult()
                        .setErrorCode(Errors.NONE.code())
                        .setUser("user1")
                        .setErrorMessage("error message")));
        return new AlterUserScramCredentialsResponse(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