public ZkMigrationState checkBootstrapZkMigrationRecord(
        MetadataVersion metadataVersion,
        boolean migrationEnabled
    ) throws Exception {
        try (
            LocalLogManagerTestEnv logEnv = new LocalLogManagerTestEnv.Builder(1).build();
            QuorumControllerTestEnv controlEnv = new QuorumControllerTestEnv.Builder(logEnv).
                setControllerBuilderInitializer(controllerBuilder ->
                    controllerBuilder.setZkMigrationEnabled(migrationEnabled)
                ).
                setBootstrapMetadata(BootstrapMetadata.fromVersion(metadataVersion, "test")).
                build()
        ) {
            QuorumController active = controlEnv.activeController();
            ZkMigrationState zkMigrationState = active.appendReadEvent("read migration state", OptionalLong.empty(),
                () -> active.featureControl().zkMigrationState()).get(30, TimeUnit.SECONDS);
            testToImages(logEnv.allRecords());
            return zkMigrationState;
        }
    }
Test that certain controller operations finish immediately without putting an event
on the controller queue, if there is nothing to do.
metadata/src/test/java/org/apache/kafka/controller/QuorumControllerTest.java