code: public static String getAllGroupsTargetFilter(final List<RolloutGroup> groups) {
          if (groups.stream().anyMatch(group -> StringUtils.isEmpty(group.getTargetFilterQuery()))) {
              return "";
          }
  
          return "(" + groups.stream().map(RolloutGroup::getTargetFilterQuery).distinct().sorted()
                  .collect(Collectors.joining("),(")) + ")";
      }
docs: Creates an RSQL expression that matches all targets in the provided
  groups. Links all target filter queries with OR.
  
  @param groups
  the rollout groups
  @return RSQL string without base filter of the Rollout. Can be an empty
  string.