public KafkaMetadataState computeNextMetadataState(KafkaStatus kafkaStatus) {
        KafkaMetadataState currentState = metadataState;
        metadataState = switch (currentState) {
            case KRaft -> onKRaft(kafkaStatus);
            case ZooKeeper -> onZooKeeper(kafkaStatus);
            case KRaftMigration -> onKRaftMigration(kafkaStatus);
            case KRaftDualWriting -> onKRaftDualWriting(kafkaStatus);
            case KRaftPostMigration -> onKRaftPostMigration(kafkaStatus);
            case PreKRaft -> onPreKRaft(kafkaStatus);
        };
        if (metadataState != currentState) {
            LOGGER.infoCr(reconciliation, "Transitioning metadata state from [{}] to [{}] with strimzi.io/kraft annotation [{}]", currentState, metadataState, kraftAnno);
        } else {
            LOGGER.debugCr(reconciliation, "Metadata state [{}] with strimzi.io/kraft annotation [{}]", metadataState, kraftAnno);
        }
        return metadataState;
    }
@Test
    public void testWarningInKRaft() {
        List<String> wrongAnnotations = List.of("rollback", "disabled", "migration");
        for (String annotation : wrongAnnotations) {
            Kafka kafka = new KafkaBuilder(KAFKA)
                    .editMetadata()
                        .addToAnnotations(Annotations.ANNO_STRIMZI_IO_KRAFT, annotation)
                    .endMetadata()
                    .withNewStatus()
                        .withKafkaMetadataState(KRaft)
                    .endStatus()
                    .build();

            KafkaMetadataStateManager kafkaMetadataStateManager = new KafkaMetadataStateManager(Reconciliation.DUMMY_RECONCILIATION, kafka);
            kafkaMetadataStateManager.computeNextMetadataState(kafka.getStatus());
            assertTrue(kafka.getStatus().getConditions().stream().anyMatch(condition -> "KafkaMetadataStateWarning".equals(condition.getReason())));
            assertEquals(kafka.getStatus().getConditions().get(0).getMessage(),
                    "The strimzi.io/kraft annotation can't be set to 'migration', 'rollback' or 'disabled' because the cluster is already KRaft.");
            assertEquals(kafka.getStatus().getKafkaMetadataState(), KRaft);
        }
    }