protected GroupedFunctionGraphVertex addToGroup(GroupedFunctionGraphVertex groupedVertex,
			Set<FGVertex> newVertices) {

		// select the new vertices along with the group vertex
		HashSet<FGVertex> combined = new HashSet<>(newVertices);
		combined.add(groupedVertex);
		pickVertices(combined);

		// execute the 'add to group' action
		JComponent component = getComponent(groupedVertex);
		DockingAction action =
			(DockingAction) TestUtils.getInstanceField("addToGroupAction", component);
		performAction(action, graphProvider, false);
		waitForAnimation();

		MultiLineInputDialog dialog = waitForDialogComponent(MultiLineInputDialog.class);

		pressButtonByText(dialog.getComponent(), "OK");

		waitForAnimation();

		FGData data = getFunctionGraphData();
		FunctionGraph functionGraph = data.getFunctionGraph();
		return getGroupVertex(functionGraph, groupedVertex.getVertexAddress());
	}
Waits for the run manager and any animation.
Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/AbstractFunctionGraphTest.java