List<Condition> run(boolean useKRaft) {
        List<Condition> warnings = new ArrayList<>();

        checkKafkaReplicationConfig(warnings);
        checkKafkaBrokersStorage(warnings);

        if (useKRaft)   {
            // Additional checks done for KRaft clusters
            checkKRaftControllerStorage(warnings);
            checkKRaftControllerCount(warnings);
            checkKafkaMetadataVersion(warnings);
            checkInterBrokerProtocolVersionInKRaft(warnings);
            checkLogMessageFormatVersionInKRaft(warnings);
        } else {
            // Additional checks done for ZooKeeper-based clusters
            checkKafkaLogMessageFormatVersion(warnings);
            checkKafkaInterBrokerProtocolVersion(warnings);
            checkKRaftMetadataStorageConfiguredForZooBasedCLuster(warnings);
        }

        return warnings;
    }
@Test
    public void testMetadataVersionMatchesKafkaVersionWithDefaultKafkaVersion() {
        Kafka kafka = new KafkaBuilder(KAFKA)
                .editSpec()
                    .editKafka()
                        .withMetadataVersion(KafkaVersionTestUtils.LATEST_METADATA_VERSION)
                    .endKafka()
                .endSpec()
                .build();

        KafkaSpecChecker checker = generateChecker(kafka, List.of(CONTROLLERS, POOL_A), new KafkaVersionChange(VERSIONS.defaultVersion(), VERSIONS.defaultVersion(), null, null, KafkaVersionTestUtils.LATEST_METADATA_VERSION));

        List<Condition> warnings = checker.run(true);

        assertThat(warnings, hasSize(0));
    }