@Test
    public void testActivationRecords34() {
        FeatureControlManager featureControl;

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.empty(), true);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.PRE_MIGRATION, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.empty(), false);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.NONE, featureControl.zkMigrationState());

        assertEquals(
            "Should not have ZK migrations enabled on a cluster that was created in KRaft mode.",
            assertThrows(RuntimeException.class, () -> getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.NONE), true)).getMessage()
        );

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.NONE), false);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.NONE, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.PRE_MIGRATION), true);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.PRE_MIGRATION, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.MIGRATION), true);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.MIGRATION, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.MIGRATION), false);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.POST_MIGRATION, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.POST_MIGRATION), true);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.POST_MIGRATION, featureControl.zkMigrationState());

        featureControl = getActivationRecords(MetadataVersion.IBP_3_4_IV0, Optional.of(ZkMigrationState.POST_MIGRATION), false);
        assertEquals(MetadataVersion.IBP_3_4_IV0, featureControl.metadataVersion());
        assertEquals(ZkMigrationState.POST_MIGRATION, featureControl.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