void enqueueMetadataChangeEvent(
        MetadataDelta delta,
        MetadataImage newImage,
        MetadataProvenance provenance,
        boolean isSnapshot,
        Consumer<Throwable> completionHandler
    ) {
        LeaderAndEpoch eventLeaderAndEpoch = KRaftMigrationDriver.this.curLeaderAndEpoch;
        MetadataChangeEvent metadataChangeEvent = new MetadataChangeEvent(
            delta,
            newImage,
            provenance,
            isSnapshot,
            completionHandler,
            eventLeaderAndEpoch
        );
        eventQueue.append(metadataChangeEvent);
    }
Construct and enqueue a {@link MetadataChangeEvent} with a given completion handler. In production use cases,
this handler is a no-op. This method exists so that we can add additional logic in our unit tests to wait for the
enqueued event to finish executing.
metadata/src/main/java/org/apache/kafka/metadata/migration/KRaftMigrationDriver.java