private DeleteRecordsResponse createDeleteRecordsResponse() {
        DeleteRecordsResponseData.DeleteRecordsTopicResultCollection topics = new DeleteRecordsResponseData.DeleteRecordsTopicResultCollection();
        DeleteRecordsResponseData.DeleteRecordsPartitionResultCollection partitions = new DeleteRecordsResponseData.DeleteRecordsPartitionResultCollection();
        partitions.add(new DeleteRecordsResponseData.DeleteRecordsPartitionResult()
                .setErrorCode(Errors.NONE.code())
                .setLowWatermark(123L)
                .setPartitionIndex(0));
        topics.add(new DeleteRecordsResponseData.DeleteRecordsTopicResult()
                .setName("topic1")
                .setPartitions(partitions));
        DeleteRecordsResponseData data = new DeleteRecordsResponseData()
                .setThrottleTimeMs(123)
                .setTopics(topics);
        return new DeleteRecordsResponse(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