### Question:
ColumnDefinitionTableBinder implements Observer, ListSelectionListener { @Override public void valueChanged(ListSelectionEvent e) { int selectedIndex = myTable.getSelectionModel().getMinSelectionIndex(); ColumnDefinitionRow selectedRow = null; if (selectedIndex >= 0) { selectedRow = myModel.getDefinitionTableModel().getRow(selectedIndex); } if (myModel.getSelectedDefinition() != selectedRow) { myModel.setSelectedDefinition(selectedRow); } int column = myTable.getSelectedColumn(); myTable.editCellAt(selectedIndex, column); } ColumnDefinitionTableBinder(JTable definitionTable, ColumnDefinitionModel model); void close(); @Override void update(Observable o, Object arg); @Override void valueChanged(ListSelectionEvent e);  }### Answer:
@SuppressWarnings("unused") @Test public void testValueChanged() { ColumnDefinitionModel model = createModel(); JTable table = createTestTable(model.getDefinitionTableModel()); ColumnDefinitionTableBinder binder = new ColumnDefinitionTableBinder(table, model); table.getSelectionModel().setSelectionInterval(0, 0); assertEquals(0, model.getSelectedDefinition().getColumnId()); table.getSelectionModel().setSelectionInterval(0, 0); assertEquals(0, model.getSelectedDefinition().getColumnId()); }