@Test
	public void testWriteTargetRequiresPresent() throws Throwable {
		createAndOpenTrace();
		Target target = addTarget();

		TraceThread thread =
			tb.obj("Processes[1].Threads[1]").queryInterface(TraceObjectThread.class);
		activateTrace(); // platform
		traceManager.activateThread(thread);
		waitForSwing();

		controlService.setCurrentMode(tb.trace, ControlMode.RW_TARGET);
		waitForSwing();
		assertEquals(target.getSnap(), traceManager.getCurrentSnap());

		traceManager.activateSnap(traceManager.getCurrentSnap() - 1);
		waitForSwing();
		assertEquals(
			"Cannot navigate time in Control Target mode. Switch to Trace or Emulate mode first.",
			tool.getStatusInfo());
		assertEquals(target.getSnap(), traceManager.getCurrentSnap());

		controlService.setCurrentMode(tb.trace, ControlMode.RW_EMULATOR);
		waitForSwing();
		traceManager.activateSnap(traceManager.getCurrentSnap() - 1);
		waitForSwing();
		assertEquals(ControlMode.RW_EMULATOR, controlService.getCurrentMode(tb.trace));

		controlService.setCurrentMode(tb.trace, ControlMode.RW_TARGET);
		waitForSwing();
		assertEquals(target.getSnap(), traceManager.getCurrentSnap());
	}
TODO: It'd be nice if this worked, since memory edits don't really require a thread
context. That would require some changes in the TraceSchedule and its execution. IINM,
each step currently requires a thread. We'd have to relax that for patch steps, and it'd
only work if they don't refer to any register.
Ghidra/Test/DebuggerIntegrationTest/src/test/java/ghidra/app/plugin/core/debug/service/control/DebuggerControlServiceTest.java