### Question:
BenefitRiskMeasurementTableModel extends AbstractTableModel { @Override public String getColumnName(int index) { switch (index) { case 0: return "Criteria"; case 1: return "Direction"; case 2: return "Description"; case 3: return "Unit"; default: return d_br.getAlternatives().get(index - EXTRA_COLUMNS).getLabel(); } } BenefitRiskMeasurementTableModel(BenefitRiskAnalysis<Alternative> bra); int getColumnCount(); int getRowCount(); @Override boolean isCellEditable(int row, int col); @Override String getColumnName(int index); @Override Class<?> getColumnClass(int index); Object getValueAt(int rowIndex, int columnIndex); static final int EXTRA_COLUMNS; }### Answer:
@Test public void testGetAlternativeNames() { for (int i = 0; i < d_brAnalysis.getAlternatives().size(); ++i) assertEquals(d_brAnalysis.getAlternatives().get(i).getLabel(), d_pm.getColumnName(i + BenefitRiskMeasurementTableModel.EXTRA_COLUMNS)); }