RankProbabilityTableModel extends AbstractTableModel { @Override public String getColumnName(int column) { if (column == 0) { return "Drug"; } else { return "Rank " + column; } } RankProbabilityTableModel(RankProbabilitySummary summary, boolean preferDescription);  RankProbabilityTableModel(RankProbabilitySummary summary); int getColumnCount(); int getRowCount(); @Override String getColumnName(int column); @Override Class<?> getColumnClass(int column); Object getValueAt(int rowIndex, int columnIndex);  }
@Test public void testColumnName() { assertEquals("Drug", d_model.getColumnName(0)); assertEquals("Rank 1", d_model.getColumnName(1)); assertEquals("Rank 2", d_model.getColumnName(2)); assertEquals("Rank 3", d_model.getColumnName(3)); }