private void selectTreeNodeByText(final JTree tree, final String text) throws Exception {
		runSwing(() -> {
			TreePath path = findTreePathToText(tree, text);
			if (path == null) {
				throw new RuntimeException("tree path is null.");
			}
			tree.expandPath(path);
		});

		waitForSwing();

		runSwing(() -> {
			TreePath path = findTreePathToText(tree, text);
			if (path == null) {
				throw new RuntimeException("tree path is null.");
			}
			tree.getSelectionModel().setSelectionPath(path);
		});
	}
Checks that the specified Diff action is in the indicated state and
causes a JUnit assert if not.

@param actionName the name of the DIff action.
@param inTool the action is currently added to the tool.
@param enabled the action is enabled.
Ghidra/Features/ProgramDiff/src/test.slow/java/ghidra/app/plugin/core/diff/DiffTest.java