### Question:
TreeTableSupport { public static TreeTableSupport install(JTable table, TreeList treeList, int modelColumnIndex) { checkAccessThread(); return new TreeTableSupport(table, treeList, modelColumnIndex); } private  TreeTableSupport(JTable table, TreeList treeList, int modelColumnIndex); static TreeTableSupport install(JTable table, TreeList treeList, int modelColumnIndex); void uninstall(); void setShowExpanderForEmptyParent(boolean showExpanderForEmptyParent); boolean getShowExpanderForEmptyParent(); void setArrowKeyExpansionEnabled(boolean arrowKeyExpansionEnabled); boolean getArrowKeyExpansionEnabled(); boolean getSpaceKeyExpansionEnabled(); void setSpaceKeyExpansionEnabled(boolean spaceKeyExpansionEnabled); void setRenderer(TreeTableCellRenderer treeTableCellRenderer); TreeTableCellRenderer getRenderer(); void setDelegateRenderer(TableCellRenderer renderer); TableCellRenderer getDelegateRenderer(); void setEditor(TreeTableCellEditor treeTableCellEditor); TreeTableCellEditor getEditor(); void setDelegateEditor(TableCellEditor editor); TableCellEditor getDelegateEditor();  }### Answer:
@Test public void testListEventsArriveOnEDT() throws InterruptedException { final EventList<String> source = new BasicEventList<>(); final TreeList<String> treeList = new TreeList<>(source, TreeListTest.COMPRESSED_CHARACTER_TREE_FORMAT, TreeList.<String>nodesStartExpanded()); final EventList<String> proxyList = GlazedListsSwing.swingThreadProxyList(treeList); final TableFormat<String> itemTableFormat = GlazedLists.tableFormat(new String[] {""}, new String[] {"Column 1"}); final DefaultEventTableModel<String> model = new DefaultEventTableModel<>(proxyList, itemTableFormat); final JTable table = new JTable(model); TreeTableSupport.install(table, treeList, 0); final TryToModifyTreeListFromBackgroundThreadRunnable r = new TryToModifyTreeListFromBackgroundThreadRunnable(source); Thread t = new Thread(r); t.start(); t.join(); assertEquals(IllegalStateException.class, r.getRuntimeException().getClass()); }
@Test public void testKeepSelectionWhenUpdatingElements() throws InterruptedException { final EventList<String> source = new BasicEventList<>(); final TreeList<String> treeList = new TreeList<>(source, TreeListTest.UNCOMPRESSED_CHARACTER_TREE_FORMAT, TreeList.<String> nodesStartExpanded()); final EventList<String> proxyList = GlazedListsSwing.swingThreadProxyList(treeList); final TableFormat<String> itemTableFormat = GlazedLists.tableFormat(new String[] { "" }, new String[] { "Column 1" }); final DefaultEventTableModel<String> model = new DefaultEventTableModel<>(proxyList, itemTableFormat); final JTable table = new JTable(model); TreeTableSupport.install(table, treeList, 0); source.add(0, "A"); source.add(1, "B"); source.add(2, "C"); source.add(3, "D"); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.setRowSelectionAllowed(true); table.setRowSelectionInterval(0, 0); assertEquals(0, table.getSelectedRow()); source.set(0, "A"); assertEquals(0, table.getSelectedRow()); }