@Test
	public void testSearchStringEntry() throws Exception {
		// verify that a string must be entered

		SearchTextDialog dialog = getDialog();

		JButton searchButton = (JButton) findButton(dialog.getComponent(), "Next");
		pressButton(searchButton);
		String status = dialog.getStatusText();
		assertTrue(status.length() > 1);

		final JTextField tf = findTextField(dialog.getComponent());
		runSwing(() -> {
			KeyListener[] kl = tf.getKeyListeners();
			kl[0].keyPressed(new KeyEvent(tf, 0, new Date().getTime(), 0, KeyEvent.VK_B, 'b'));
		});
		status = dialog.getStatusText();
		assertTrue(status.length() <= 1);
	}
Tests for the search text plugin.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/searchtext/SearchTextPlugin1Test.java