### Question:
JXTableSupport { public void uninstall() { checkAccessThread(); tableComparatorChooser.dispose(); tableMemento.restoreStateTo(table); tableModel.dispose(); selectionModel.dispose(); tableComparatorChooser = null; tableModel = null; selectionModel = null; tableFormat = null; table = null; tableMemento = null; } private  JXTableSupport(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); static JXTableSupport<E> install(JXTable table, EventList<E> eventList,
            TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy); JXTable getTable(); AdvancedListSelectionModel<E> getTableSelectionModel(); AdvancedTableModel<E> getTableModel(); TableFormat<? super E> getTableFormat(); TableComparatorChooser<E> getTableComparatorChooser(); void uninstall(); boolean isInstalled();  }### Answer:
@Test public void testUninstall() { final TableModel oldTableModel = table.getModel(); final ListSelectionModel oldSelectionModel = table.getSelectionModel(); final boolean isSortable = table.isSortable(); final TableCellRenderer oldDefaultRenderer = table.getTableHeader().getDefaultRenderer(); final JXTableSupport support = JXTableSupport.install(table, colors, colorTableFormat, sortedColors, TableComparatorChooser.SINGLE_COLUMN); assertTrue(support.isInstalled()); support.uninstall(); assertFalse(support.isInstalled()); assertNull(support.getTableModel()); assertNull(support.getTableSelectionModel()); assertNull(support.getTableComparatorChooser()); assertNull(support.getTable()); assertNull(support.getTableFormat()); assertEquals(oldTableModel, table.getModel()); assertEquals(oldSelectionModel, table.getSelectionModel()); assertEquals(isSortable, table.isSortable()); assertEquals(oldDefaultRenderer, table.getTableHeader().getDefaultRenderer()); }
@Test @ExecuteOnNonUiThread public void testOnMainThreadUninstallEDTViolation() throws Exception { final InstallRunnable runnable = new InstallRunnable(); EventQueue.invokeAndWait(runnable); try { runnable.getJXTableSupport().uninstall(); fail("failed to receive IllegalStateException because of wrong thread usage"); } catch (IllegalStateException ex) { } EventQueue.invokeAndWait(new Runnable() { @Override public void run() { runnable.getJXTableSupport().uninstall(); } }); }