### Question:
CheckBoxTableModel extends AbstractTableModel { @Override public Object getValueAt(int rowIndex, int columnIndex) { checkRowIndex(rowIndex); if (columnIndex == 0) { return myBooleans.get(rowIndex); } else if (columnIndex == 1) { return myValues.get(rowIndex); } else { throw new IllegalArgumentException("Column index out of bounds: " + columnIndex); } } CheckBoxTableModel(String checkBoxHeader, String valueHeader, Boolean initialCheckBoxState,
            Collection<? extends String> values); List<String> getCheckedValues(); @Override Class<?> getColumnClass(int columnIndex); @Override int getColumnCount(); @Override String getColumnName(int column); @Override int getRowCount(); @Override Object getValueAt(int rowIndex, int columnIndex); @Override boolean isCellEditable(int rowIndex, int columnIndex); void setCheckedValues(Collection<? extends String> values); @Override void setValueAt(Object aValue, int rowIndex, int columnIndex);  }### Answer:
@Test public void testGetValueAt() { for (int row = 0; row < myModel.getRowCount(); ++row) { Assert.assertEquals(Boolean.TRUE, myModel.getValueAt(row, 0)); Assert.assertEquals(VALUES.get(row), myModel.getValueAt(row, 1)); } try { myModel.getValueAt(-1, 0); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } try { myModel.getValueAt(VALUES.size(), 0); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } }