@Test
	public void testDisableResumeAnalysisTaskWorkerInvocation() throws Exception {
		env.showTool();
		loadProgram("notepad_empty");

		AutoAnalysisManager mgr = AutoAnalysisManager.getAnalysisManager(program);
		schedule(mgr, new SetTestPropertyCommand("p0", 500), 0);
		schedule(mgr, new SetTestPropertyCommand("p1", 500), 10);

		WorkerBackgroundTestCmd cmd = new WorkerBackgroundTestCmd(true);
		schedule(mgr, cmd, 0);
		cmd.waitUntilFinished();

		if (cmd.error != null) {
			failWithException("Unexpected exception", cmd.error);
		}

		verifyProgramStateThenUndo(true);
	}
Test running an AnalysisWorker from an analysis task thread
with events used by analysis at various priority levels.
@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/AutoAnalysisWorkerTest.java