private void doTestSelectionRestoreAfterSorting(boolean isThreaded) {
		//
		// Make a selection.  Change the sort.  Make sure the same 'row object' is selected.
		//
		String threadedDescription = isThreaded ? "threaded model" : "non-threaded model";
		createTable(isThreaded);
		assertEquals("Table unexpectedly has a selection by default for " + threadedDescription, 0,
			table.getSelectedRowCount());

		int startRow = 0;
		selectRow(startRow);
		StringRowObject startObject = getSelectedObject();

		changeSort();

		waitForTableModel();

		StringRowObject endObject = getSelectedObject();
		assertEquals("Incorrect object was re-selected", startObject, endObject);
	}
Make sure that either the two given rows are an exact match, or that the row objects that
represent each row are equal()
Ghidra/Features/Base/src/test.slow/java/docking/widgets/table/SelectionManagerTest.java