protected FGController cloneGraph() {

		DockingActionIf snapshotAction =
			AbstractDockingTest.getAction(tool, graphPlugin.getName(), "Function Graph Clone");
		performAction(snapshotAction, true);

		@SuppressWarnings("unchecked")
		List<FGProvider> disconnectedProviders =
			(List<FGProvider>) getInstanceField("disconnectedProviders", graphPlugin);
		assertEquals(1, disconnectedProviders.size());
		FGProvider providerClone = disconnectedProviders.get(0);
		FGController controllerClone = providerClone.getController();

		waitForBusyRunManager(controllerClone);
		waitForAnimation(controllerClone);

		return controllerClone;
	}
Waits for the run manager and any animation.
Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/AbstractFunctionGraphTest.java