@Test
    public void testActivationMessageForNonEmptyLogNoMigrations() {
        ControllerResult<Void> result;

        result = ActivationRecordsGenerator.recordsForNonEmptyLog(
            logMsg -> assertEquals("Performing controller activation. No metadata.version feature level " +
                "record was found in the log. Treating the log as version 3.0-IV1.", logMsg),
            -1L,
            false,
            buildFeatureControl(MetadataVersion.MINIMUM_KRAFT_VERSION, Optional.empty()),
            MetadataVersion.MINIMUM_KRAFT_VERSION
        );
        assertTrue(result.isAtomic());
        assertEquals(0, result.records().size());

        result = ActivationRecordsGenerator.recordsForNonEmptyLog(
            logMsg -> assertEquals("Performing controller activation.", logMsg),
            -1L,
            false,
            buildFeatureControl(MetadataVersion.IBP_3_3_IV0, Optional.empty()),
            MetadataVersion.IBP_3_3_IV0
        );
        assertTrue(result.isAtomic());
        assertEquals(0, result.records().size());

        result = ActivationRecordsGenerator.recordsForNonEmptyLog(
            logMsg -> assertEquals("Performing controller activation. Loaded ZK migration state of NONE. "
                                   + "This is expected because this is a de-novo KRaft cluster.", logMsg),
            -1L,
            false,
            buildFeatureControl(MetadataVersion.IBP_3_4_IV0, Optional.empty()),
            MetadataVersion.IBP_3_4_IV0
        );
        assertTrue(result.isAtomic());
        assertEquals(0, result.records().size());

        result = ActivationRecordsGenerator.recordsForNonEmptyLog(
            logMsg -> assertEquals("Performing controller activation. Aborting in-progress metadata " +
                                   "transaction at offset 42. Loaded ZK migration state of NONE. " +
                                   "This is expected because this is a de-novo KRaft cluster.", logMsg),
            42L,
            false,
            buildFeatureControl(MetadataVersion.IBP_3_6_IV1, Optional.empty()),
            MetadataVersion.IBP_3_6_IV1
        );
        assertTrue(result.isAtomic());
        assertEquals(1, result.records().size());

        assertEquals(
            "Detected in-progress transaction at offset 42, but the metadata.version 3.6-IV0 does not support " +
                "transactions. Cannot continue.",
            assertThrows(RuntimeException.class, () ->
                ActivationRecordsGenerator.recordsForNonEmptyLog(
                    logMsg -> fail(),
                    42L,
                    false,
                    buildFeatureControl(MetadataVersion.IBP_3_6_IV0, Optional.empty()),
                    MetadataVersion.IBP_3_6_IV0
                )).getMessage()
        );
    }
This class is for testing the log message or exception produced by ActivationRecordsGenerator. For tests that
verify the semantics of the returned records, see QuorumControllerTest.
metadata/src/test/java/org/apache/kafka/controller/ActivationRecordsGeneratorTest.java