public static void main(String[] args) throws Exception {
        if (args == null || args.length == 0) {
            testLocale(Locale.getDefault());
        } else {
            String lang = null;
            String country = null;
            String variant = null;
            for (int i = 0; i < args.length; i++) {
                switch (i) {
                    case 1:
                        lang = args[i];
                        break;
                    case 2:
                        country = args[i];
                        break;
                    case 3:
                        variant = args[i];
                        break;
                }
            }
            final Locale locale;
            if (country == null) {
                locale = new Locale(lang.toLowerCase());
            } else if (variant == null) {
                locale = new Locale(lang.toLowerCase(), country.toLowerCase());
            } else {
                locale = new Locale(lang.toLowerCase(), country.toLowerCase(), variant);
            }
            testLocale(locale);
        }
    }