### Question:
CheckBoxTableModel extends AbstractTableModel { @Override public Class<?> getColumnClass(int columnIndex) { if (columnIndex == 0) { return Boolean.class; } else if (columnIndex == 1) { return Object.class; } 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 testGetColumnClassInt() { Assert.assertEquals(Boolean.class, myModel.getColumnClass(0)); Assert.assertEquals(Object.class, myModel.getColumnClass(1)); try { myModel.getColumnClass(-1); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } try { myModel.getColumnClass(2); Assert.fail(IllegalArgumentException.class + " should have been thrown."); } catch (IllegalArgumentException e) { } }