code: @Override
      protected void prepareActions() throws QTasteTestFailException {
          mIndex = Integer.parseInt(mData[0].toString());
          if (component instanceof ComboBox) {
              ComboBox<?> combo = (ComboBox<?>) component;
              if (combo.getItems().size() < mIndex) {
                  throw new QTasteTestFailException("Specified index is out of bounds");
              }
          } else if (component instanceof ListView) {
              ListView<?> list = (ListView<?>) component;
              if (list.getItems().size() < 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 ComboBox or a ListView.