SnapshotTableModel extends AbstractTableModel { @Override public int getColumnCount() { return 2; } SnapshotTableModel(Object[][] objects); @Override int getRowCount(); @Override int getColumnCount(); @Override String getColumnName(int column); @Override Class<?> getColumnClass(int columnIndex); @Override Object getValueAt(int rowIndex, int columnIndex);  }
@Test public void testColumnCount() { assertEquals(2, tableModel.getColumnCount()); }