private void searchBackward(String buttonText) throws Exception {
		SearchTextDialog dialog = getDialog();
		JComponent container = dialog.getComponent();
		JTextField tf = findTextField(container);
		selectRadioButton(container, buttonText);

		selectCheckBox(container, "Functions");
		selectCheckBox(container, "Instruction Mnemonics");
		selectCheckBox(container, "Instruction Operands");
		deSelectCheckBox(container, "Comments");

		goToService.goTo(new ProgramLocation(program, getAddr(0x0100417f)));

		setText(tf, "formatCount");
		searchBackOnce(dialog);
		waitForSearchTasks(dialog);

		ProgramLocation loc = cbPlugin.getCurrentLocation();
		assertTrue(loc instanceof OperandFieldLocation);
		assertEquals(1, ((OperandFieldLocation) loc).getOperandIndex());
		assertEquals(getAddr(0x01004178), loc.getAddress());

		searchBackOnce(dialog);
		waitForSearchTasks(dialog);

		loc = cbPlugin.getCurrentLocation();

		assertTrue(loc instanceof OperandFieldLocation);
		assertEquals(0, ((OperandFieldLocation) loc).getOperandIndex());
		assertEquals(getAddr(0x0100416f), loc.getAddress());

		searchBackOnce(dialog);
		waitForSearchTasks(dialog);

		loc = cbPlugin.getCurrentLocation();
		assertTrue(loc instanceof VariableNameFieldLocation);
		assertEquals(getAddr(0x0100415a), loc.getAddress());

		searchBackOnce(dialog);
		waitForSearchTasks(dialog);

		loc = cbPlugin.getCurrentLocation();
		assertTrue(loc instanceof VariableNameFieldLocation);
		assertEquals(getAddr(0x0100415a), loc.getAddress());
		assertEquals("Not found", dialog.getStatusText());
	}
Tests for the search text plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin1Test.java