class OSUtils {

    public static boolean createUser(String userName) {
        try {
            String userGroup = OSUtils.getGroup();
            if (StringUtils.isEmpty(userGroup)) {
                String errorLog = String.format("%s group does not exist for this operating system.", userGroup);
                LoggerUtils.logError(Optional.ofNullable(logger), errorLog);
                LoggerUtils.logError(Optional.ofNullable(taskLoggerThreadLocal.get()), errorLog);
                return false;
            }
            if (isMacOS()) {
                createMacUser(userName, userGroup);
            } else if (isWindows()) {
                createWindowsUser(userName, userGroup);
            } else {
                createLinuxUser(userName, userGroup);
            }
            return true;
        } catch (Exception e) {
            LoggerUtils.logError(Optional.ofNullable(logger), e);
            LoggerUtils.logError(Optional.ofNullable(taskLoggerThreadLocal.get()), e);
        }

        return false;
    }

    private  OSUtils();

}