@Test
	public void testNextPreviousActionSwitchPanelFocus() {
		Set<Function> functions = Set.of(foo, bar);
		provider = compareFunctions(functions);
		DockingActionIf nextAction = getAction(plugin, "Compare Next Function");
		DockingActionIf previousAction = getAction(plugin, "Compare Previous Function");

		// left panel has focus, so nextAction should be enabled and previous should be disabled
		ActionContext context = provider.getActionContext(null);
		assertEnabled(nextAction, context);
		assertNotEnabled(previousAction, context);

		JPanel rightPanel =
			provider.getComponent().getDualListingPanel().getListingPanel(RIGHT).getFieldPanel();
		clickMouse(rightPanel, 1, 30, 30, 1, 0);
		waitForSwing();
		provider.getComponent().updateActionEnablement();

		// right panel has focus, so nextAction should be disabled and previous should be enabled
		context = provider.getActionContext(null);
		assertNotEnabled(nextAction, context);
		assertEnabled(previousAction, context);
	}
Tests for the {@link FunctionComparisonPlugin function comparison plugin}
that involve the GUI
Ghidra/Features/CodeCompare/src/main/test/ghidra/features/codecompare/plugin/CompareFunctionsProviderTest.java