protected void prepareActions() throws QTasteTestFailException {
mIndex = Integer.parseInt(mData[2].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");
}
}