### Question:
JXTableSupport { public static <E> JXTableSupport<E> install(JXTable table, EventList<E> eventList, TableFormat<? super E> tableFormat, SortedList<E> sortedList, Object sortingStrategy) { Preconditions.checkNotNull(table, "JXTable must be defined."); Preconditions.checkNotNull(eventList, "EventList must be defined."); Preconditions.checkNotNull(tableFormat, "TableFormat must be defined."); Preconditions.checkNotNull(sortedList, "SortedList must be defined."); Preconditions.checkNotNull(sortingStrategy, "SortingStrategy must be defined."); checkAccessThread(); return new JXTableSupport<>(table, eventList, tableFormat, sortedList, sortingStrategy); } 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 testInstall() { final JXTableSupport support = JXTableSupport.install(table, colors, colorTableFormat, sortedColors, TableComparatorChooser.SINGLE_COLUMN); assertTrue(support.isInstalled()); assertNotNull(support.getTableModel()); assertEquals(support.getTableModel(), table.getModel()); assertTrue(table.getModel() instanceof AdvancedTableModel); assertNotNull(support.getTableSelectionModel()); assertEquals(support.getTableSelectionModel(), table.getSelectionModel()); assertTrue(table.getSelectionModel() instanceof AdvancedListSelectionModel); assertNotNull(support.getTableComparatorChooser()); assertEquals(table, support.getTable()); assertEquals(colorTableFormat, support.getTableFormat()); assertFalse(table.isSortable()); assertTrue(table.getTableHeader().getDefaultRenderer() instanceof SortArrowHeaderRenderer); }
@Test @ExecuteOnNonUiThread public void testOnMainThreadInstallEDTViolation() { try { JXTableSupport.install(table, colors, colorTableFormat, sortedColors, TableComparatorChooser.SINGLE_COLUMN); fail("failed to receive IllegalStateException because of wrong thread usage"); } catch (IllegalStateException ex) { } }