@ClusterTests({
        @ClusterTest(types = {Type.KRAFT, Type.CO_KRAFT}, brokers = 2, controllers = 2),
        @ClusterTest(types = {Type.KRAFT, Type.CO_KRAFT}, brokers = 2, controllers = 1),
        @ClusterTest(types = {Type.KRAFT, Type.CO_KRAFT}, brokers = 1, controllers = 2),
    })
    public void testDescribeQuorumStatusSuccessful(ClusterInstance cluster) throws InterruptedException {
        cluster.waitForReadyBrokers();
        String describeOutput = ToolsTestUtils.captureStandardOut(
            () -> MetadataQuorumCommand.mainNoExit(
                "--bootstrap-server",
                cluster.bootstrapServers(),
                "describe",
                "--status"
            )
        );
        String[] outputs = describeOutput.split("\n");

        assertTrue(outputs[0].matches("ClusterId:\\s+\\S{22}"), describeOutput);
        assertTrue(outputs[1].matches("LeaderId:\\s+\\d+"), describeOutput);
        assertTrue(outputs[2].matches("LeaderEpoch:\\s+\\d+"), describeOutput);
        // HighWatermark may be -1
        assertTrue(outputs[3].matches("HighWatermark:\\s+-?\\d+"), describeOutput);
        assertTrue(outputs[4].matches("MaxFollowerLag:\\s+\\d+"), describeOutput);
        assertTrue(outputs[5].matches("MaxFollowerLagTimeMs:\\s+-?\\d+"), describeOutput);
        assertTrue(
            outputs[6].matches("CurrentVoters:\\s+\\[\\d+(,\\d+)*]"),
            describeOutput
        );

        // There are no observers if we have fewer brokers than controllers
        if (cluster.type() == Type.CO_KRAFT && cluster.config().numBrokers() <= cluster.config().numControllers()) {
            assertTrue(outputs[7].matches("CurrentObservers:\\s+\\[]"), describeOutput);
        } else {
            assertTrue(
                outputs[7].matches("CurrentObservers:\\s+\\[\\d+(,\\d+)*]"),
                describeOutput
            );
        }
    }
1. The same number of broker controllers
2. More brokers than controllers
3. Fewer brokers than controllers
tools/src/test/java/org/apache/kafka/tools/MetadataQuorumCommandTest.java