@Test
	public void testEmulateResumeAction() throws Throwable {
		TraceThread thread = createToyLoopTrace();
		controlService.setCurrentMode(tb.trace, ControlMode.RW_EMULATOR);

		traceManager.activateThread(thread);
		waitForSwing();

		performEnabledAction(null, controlPlugin.actionEmulateResume, true);
		waitForPass(() -> assertFalse(controlPlugin.actionEmulateResume.isEnabled()));

		CachedEmulator ce = Unique.assertOne(emulationService.getBusyEmulators());
		ce.emulator().setSuspended(true);
		waitForTasks();
		assertTrue(controlPlugin.actionEmulateResume.isEnabled());
	}
Tests for target control and state editing

<p>
In these and other control service integration tests, we use {@link ControlMode#RW_EMULATOR} as a
stand-in for any mode. We also use {@link ControlMode#RO_TARGET} just to verify the mode is
heeded. Other modes may be tested if bugs crop up in various combinations.
Ghidra/Test/DebuggerIntegrationTest/src/test/java/ghidra/app/plugin/core/debug/gui/control/DebuggerControlPluginTest.java