public Optional<String> reasonAllControllersZkMigrationNotReady(
        MetadataVersion metadataVersion,
        Map<Integer, ControllerRegistration> controllers
    ) {
        if (!metadataVersion.isMigrationSupported()) {
            return Optional.of("The metadata.version too low at " + metadataVersion);
        } else if (!metadataVersion.isControllerRegistrationSupported()) {
            return Optional.empty();
        }
        for (int quorumNodeId : quorumNodeIds) {
            ControllerRegistration registration = controllers.get(quorumNodeId);
            if (registration == null) {
                return Optional.of("No registration found for controller " + quorumNodeId);
            } else if (!registration.zkMigrationReady()) {
                return Optional.of("Controller " + quorumNodeId + " has not enabled " +
                        "zookeeper.metadata.migration.enable");
            }
        }
        return Optional.empty();
    }
@Test
    public void testZkMigrationNotReadyIfNotAllControllersRegistered() {
        assertEquals(Optional.of("No registration found for controller 0"),
            QUORUM_FEATURES.reasonAllControllersZkMigrationNotReady(
                MetadataVersion.IBP_3_7_IV0, Collections.emptyMap()));
    }