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

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

		Runnable r = () -> {
			try {
				mgr.scheduleWorker(worker, null, false, TaskMonitor.DUMMY);
				Assert.fail("Expected UnsupportedOperationException");
			}
			catch (UnsupportedOperationException e1) {
				// expected
			}
			catch (Exception e2) {
				failWithException("Unexpected exception", e2);
			}
		};

		runSwing(r);
	}
Test attempt to run an AnalysisWorker from swing thread
@throws Exception
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/AutoAnalysisWorkerTest.java