private static void convertAndSaveToYaml(final Map<String, Object> properties,
                                             final String outputPath) throws Exception {
        val options = new DumperOptions();
        options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
        options.setDefaultScalarStyle(DumperOptions.ScalarStyle.PLAIN);
        options.setPrettyFlow(true);
        options.setAllowUnicode(true);
        options.setIndent(2);
        val yaml = new Yaml(options);
        try (val writer = new FileWriter(outputPath, StandardCharsets.UTF_8)) {
            yaml.dump(properties, writer);
        }
    }
Convert properties to YAML.

@param propertiesFile the properties file
@throws Exception the exception
support/cas-server-support-shell-core/src/main/java/org/apereo/cas/shell/commands/properties/ConvertPropertiesToYAMLCommand.java