@Test
	public void testExecutorWrite() throws Throwable {
		setupExecTest();

		PcodeProgram prog = SleighProgramCompiler.compileProgram(language, "test",
			"r2 = r0 + r1;", PcodeUseropLibrary.NIL);
		PcodeExecutor<byte[]> executor = DebuggerPcodeUtils.executorForCoordinates(tool,
			DebuggerCoordinates.NOWHERE.target(target).thread(thread));

		CompletableFuture<Void> futResult =
			CompletableFuture.runAsync(() -> executor.execute(prog, PcodeUseropLibrary.nil()));

		long snap = target.getSnap();
		handleReadRegsInvocation(tb.obj("Processes[1].Threads[1].Stack[0].Registers"), () -> {
			try (Transaction tx = tb.startTransaction()) {
				TraceMemorySpace regs =
					tb.trace.getMemoryManager().getMemoryRegisterSpace(thread, true);
				regs.setValue(snap, new RegisterValue(tb.reg("r0"), new BigInteger("5")));
				regs.setValue(snap, new RegisterValue(tb.reg("r1"), new BigInteger("6")));
			}
			return null;
		});

		handleWriteRegInvocation(
			tb.obj("Processes[1].Threads[1].Stack[0]").queryInterface(TraceObjectStackFrame.class),
			"r2", 11);

		waitOn(futResult);
	}
TODO: This second handle should not be necessary. The KNOWN ought to carry into the
scratch snapshot.
Ghidra/Test/DebuggerIntegrationTest/src/test/java/ghidra/pcode/exec/TraceRmiPcodeExecTest.java