public void setCurrTestIndex(int argCurrTestIndex) {
    if(argCurrTestIndex < 0 || argCurrTestIndex >= tests.getSize()){
      throw new IllegalArgumentException("Invalid test index");
    }
    if(currTestIndex == argCurrTestIndex){
      return;
    }
    
    if(!isTestAt(argCurrTestIndex)){
      throw new IllegalArgumentException("No test at " + argCurrTestIndex);
    }
    currTestIndex = argCurrTestIndex;
    ListItem item = (ListItem) tests.getElementAt(argCurrTestIndex);
    test = item.test;
    for (TestChangedListener listener : listeners) {
      listener.testChanged(test, currTestIndex);
    }
  }