@Before
	public void setUp() throws Exception {

		env = new TestEnv();
		program = buildProgram();
		tool = env.launchDefaultTool(program);

		plugin = env.getPlugin(InstructionSearchPlugin.class);
		CodeBrowserPlugin cb = env.getPlugin(CodeBrowserPlugin.class);

		// Open the main dialog.
		openSearchDialogAction = getAction(plugin, "Search Instruction Patterns");
		ActionContext context = runSwing(() -> cb.getProvider().getActionContext(null));
		performAction(openSearchDialogAction, context, true);

		// Grab the dialog and components for the window; all tests need them.
		dialog = waitForDialogComponent(InstructionSearchDialog.class);
		component = dialog.getComponent();

		// Now create a selection that encompasses the entire range.
		loadSelection("0x004065e1", "0x004065f2");
	}
Test of the instruction pattern search functionality.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchTest.java