@Test
	public void testAddFunctionToExistingCompare() {
		Set<Function> functions = Set.of(foo);
		provider = compareFunctions(functions);

		assertEquals(provider.getModel().getFunctions(LEFT).size(), 1);
		assertTrue(provider.getModel().getFunctions(LEFT).contains(foo));

		DockingActionIf openTableAction = getAction(plugin, "Add Functions To Comparison");
		performAction(openTableAction, provider, false);

		TableSelectionDialog<?> chooser =
			waitForDialogComponent(TableSelectionDialog.class);

		GFilterTable<?> table = (GFilterTable<?>) getInstanceField("gFilterTable", chooser);

		waitForCondition(() -> table.getModel().getRowCount() == 2);
		clickTableCell(table.getTable(), 1, 0, 1);

		pressButtonByText(chooser, "OK");
		waitForSwing();
		assertEquals(provider.getModel().getFunctions(LEFT).size(), 2);
		assertTrue(provider.getModel().getFunctions(LEFT).contains(foo));
		assertTrue(provider.getModel().getFunctions(LEFT).contains(bat));
	}
Tests for the {@link FunctionComparisonPlugin function comparison plugin}
that involve the GUI
Ghidra/Features/CodeCompare/src/main/test/ghidra/features/codecompare/plugin/CompareFunctionsProviderTest.java