private DeleteRecordsRequest createDeleteRecordsRequest(short version) {
        DeleteRecordsRequestData.DeleteRecordsTopic topic = new DeleteRecordsRequestData.DeleteRecordsTopic()
                .setName("topic1")
                .setPartitions(singletonList(new DeleteRecordsRequestData.DeleteRecordsPartition()
                        .setPartitionIndex(1)
                        .setOffset(123L)));
        DeleteRecordsRequestData data = new DeleteRecordsRequestData()
                .setTopics(singletonList(topic))
                .setTimeoutMs(123);
        return new DeleteRecordsRequest.Builder(data).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