TableSortController extends DefaultSortController<M> { public void setModel(M model) { tableModel = model; if (model != null) cachedModelRowCount = model.getRowCount(); setModelWrapper(new TableRowSorterModelWrapper()); } TableSortController();  TableSortController(M model); void setModel(M model); @Override Comparator<?> getComparator(int column);  }
@Test public void testSetModelCleanup() { controller.setModel(null); assertEquals(0, controller.getModelRowCount()); assertEquals(0, controller.getViewRowCount()); }