public static void waitForProgram(Program program) {
		if (program != null) {
			program.flushEvents();
		}

		waitForSwing();
	}
Flushes the given program's events before waiting for the swing update manager

@param program The program whose events will be flushed; may be null
Ghidra/Features/Base/src/main/java/ghidra/test/AbstractGhidraHeadedIntegrationTest.java