@Test
	public void testSearchCurrentSelection() {

		// Make sure "current selection is selected.
		setToggleButtonSelected(component, "Search Selection", true);

		// Wait for the gui to finish updating.
		dialog.waitForCurrentTask();

		// Now do an initial search that should return a single result.  This is the case where
		// we're searching for a set of instructions that matches exactly our selection.
		pressSearchAll();

		// Wait for the results window and verify the result count
		assertResultsTableRowCount(1);
	}
Test that we can search for results only within the currently-selected
region.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchTest.java