### Question:
SelectableStudyCharTableModel extends StudyCharTableModel { public ModifiableHolder<Boolean> getSelectedStudyBooleanModel(Study s) throws IllegalArgumentException{ if (!getAvailableStudies().contains(s)) { throw new IllegalArgumentException(); } return d_selectedStudiesMap.get(s); } SelectableStudyCharTableModel(StudyListPresentation source, PresentationModelFactory pmf); ObservableList<Study> getAvailableStudies(); ObservableList<Study> getSelectedStudiesModel(); ModifiableHolder<Boolean> getSelectedStudyBooleanModel(Study s); @Override int getColumnCount(); @Override Class<?> getColumnClass(int c); @Override Object getValueAt(int rowIndex, int columnIndex); @Override String getColumnName(int columnIndex); @Override boolean isCellEditable(int rowIndex, int columnIndex); @Override void setValueAt(Object newValue, int rowIndex, int columnIndex);  }### Answer:
@Test public void testGetSelectedBooleanModel() { assertTrue(d_model.getSelectedStudyBooleanModel(d_studies.get(0)).getValue()); assertTrue(d_model.getSelectedStudyBooleanModel(d_studies.get(1)).getValue()); }
@Test(expected=IllegalArgumentException.class) public void testUnknownStudy() { d_model.getSelectedStudyBooleanModel(new Study("xxxx", d_ind)); }
@Test public void testGetSelectedModelOnChange() { d_model.getSelectedStudyBooleanModel(d_studies.get(0)).setValue(false); Study newStudy = new Study("new study", d_ind); d_studies.add(newStudy); assertFalse(d_model.getSelectedStudyBooleanModel(d_studies.get(0)).getValue()); assertTrue(d_model.getSelectedStudyBooleanModel(d_studies.get(1)).getValue()); assertTrue(d_model.getSelectedStudyBooleanModel(newStudy).getValue()); }