public static Map<String, List<String>> prepareArgs(String[] args) {
        Map<String, List<String>> preparedArgs = new HashMap<String, List<String>>();
        List<String> values = null;
        String key = null;
        for (String arg : args) {
            if (arg.startsWith("--")) {
                key = arg.substring(2);
                values = new ArrayList<String>();
                if (key != null) {
                    preparedArgs.put(key, values);
                }
            } else {
                if (values != null) {
                    values.add(arg);
                }
            }
        }
        if (!preparedArgs.containsKey("args")) {
            preparedArgs.put("args", new ArrayList<String>());
        }
        return preparedArgs;
    }