code: public Stream<LsQuestionGroup> getGroups(int surveyId) throws LimesurveyRCException {
          JsonElement result = callRC(new LsApiBody("list_groups", getParamsWithKey(surveyId)));
          List<LsQuestionGroup> questionGroups = gson.fromJson(result, new TypeToken<List<LsQuestionGroup>>() {
          }.getType());
  
          return questionGroups.stream().sorted(Comparator.comparing(LsQuestionGroup::getOrder));
      }
docs: Gets groups from a survey.
  The groups are ordered using the "group_order" field.
  
  @param surveyId the survey id you want to get the groups
  @return a stream of groups in an ordered order
  @throws LimesurveyRCException the limesurvey rc exception