private static String getRealm(final StringTokenizer st, final int count) {
        var realm = StringUtils.EMPTY;
        for (var i = 0; i < count; i++) {
            realm = st.nextToken();
        }
        return realm.toUpperCase(Locale.ENGLISH);
    }
This is {@link UriRealmParser}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-ws-sts-api/src/main/java/org/apereo/cas/support/realm/UriRealmParser.java