### Question:
CheckBoxTableModel extends AbstractTableModel { @Override public String getColumnName(int column) { if (column < 0 || column > 1) { throw new IllegalArgumentException("Column index out of bounds: " + column); } return myHeaders.get(column); } 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 testGetColumnNameInt() { Assert.assertEquals("", myModel.getColumnName(0)); Assert.assertEquals("Title", myModel.getColumnName(1)); try { myModel.getColumnName(-1); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } try { myModel.getColumnName(2); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } }