private void setKeyBindingViaF4Dialog(DockingAction action, KeyStroke ks) {

		// simulate the user mousing over the toolbar button
		assertNotNull("Provider action not installed in toolbar", action);
		DockingWindowManager.setMouseOverAction(action);

		performLaunchKeyStrokeDialogAction();
		KeyEntryDialog keyDialog = waitForDialogComponent(KeyEntryDialog.class);

		runSwing(() -> keyDialog.setKeyStroke(ks));

		pressButtonByText(keyDialog, "OK");

		assertFalse("Invalid key stroke: " + ks, runSwing(() -> keyDialog.isVisible()));
	}
Interface for tests to signal what is expected of the executor
Ghidra/Features/Base/src/test.slow/java/ghidra/app/tablechooser/TableChooserDialogTest.java