### Question:
BRATTableModel extends AbstractTableModel { @Override public String getColumnName(int column) { switch(column) { case COLUMN_BR: return ""; case COLUMN_CRITERIA: return "Outcome"; case COLUMN_OUTCOME_TYPE: return "Type"; case COLUMN_BASELINE: return getAlternativeDescription(getBaseline()); case COLUMN_SUBJECT: return getAlternativeDescription(getSubject()); case COLUMN_DIFFERENCE: return "Difference (95% CI)"; case COLUMN_FOREST: return ""; default: return""; } } BRATTableModel(AnalysisType bean, Alternative subject); @Override int getColumnCount(); @Override int getRowCount(); @Override Object getValueAt(int rowIndex, int columnIndex); @Override String getColumnName(int column); @Override Class<?> getColumnClass(int columnIndex); Alternative getBaseline(); Alternative getSubject(); static final int COLUMN_BR; static final int COLUMN_CRITERIA; static final int COLUMN_OUTCOME_TYPE; static final int COLUMN_BASELINE; static final int COLUMN_SUBJECT; static final int COLUMN_DIFFERENCE; static final int COLUMN_FOREST; static final int OFFSET_LOGAXIS; static final int OFFSET_LINAXIS; }### Answer:
@Test public void testColumnNames() { assertEquals("", d_btmMeta.getColumnName(COLUMN_BR)); assertEquals("Outcome", d_btmMeta.getColumnName(COLUMN_CRITERIA)); assertEquals("Type", d_btmMeta.getColumnName(COLUMN_OUTCOME_TYPE)); assertEquals("Paroxetine", d_btmMeta.getColumnName(COLUMN_BASELINE)); assertEquals("Fluoxetine", d_btmMeta.getColumnName(COLUMN_SUBJECT)); assertEquals("Paroxetine 25.5 mg/day", d_btmStudy.getColumnName(COLUMN_BASELINE)); assertEquals("Fluoxetine 27.5 mg/day", d_btmStudy.getColumnName(COLUMN_SUBJECT)); assertEquals("Difference (95% CI)", d_btmMeta.getColumnName(COLUMN_DIFFERENCE)); assertEquals("", d_btmMeta.getColumnName(COLUMN_BR)); }