code: @Override
      protected void prepareActions() throws QTasteTestFailException {
          mIndex = Integer.parseInt(mData[0].toString());
          if (component instanceof JComboBox) {
              JComboBox combo = (JComboBox) component;
              if (combo.getItemCount() < mIndex) {
                  throw new QTasteTestFailException("Specified index is out of bounds");
              }
          } else if (component instanceof JList) {
              JList list = (JList) component;
              if (list.getModel().getSize() < mIndex) {
                  throw new QTasteTestFailException("Specified index is out of bounds");
              }
          } else {
              throw new QTasteTestFailException("Unsupported component");
          }
      }
docs: Takes the index in the user data (the second parameter) and checks the component's type.
  
  @throws QTasteTestFailException if the component is not a JComboBox or a JList.