code: @Override
      public synchronized String execute(SampleResult previousResult, Sampler currentSampler)
              throws InvalidVariableException {
          JMeterVariables vars = getVariables();
          String varName = ((CompoundVariable) values[values.length - 1]).execute().trim();
          int index = random.nextInt(values.length - 1);
          String choice = ((CompoundVariable) values[index]).execute();
  
          if (vars != null && varName != null && varName.length() > 0) {// vars will be null on TestPlan
              vars.put(varName, choice);
          }
  
          return choice;
      }
docs: {@inheritDoc}