protected void executeMerge(boolean doWait) throws Exception {

		originalProgram = mtf.getOriginalProgram();
		myProgram = mtf.getPrivateProgram();// my program
		resultProgram = mtf.getResultProgram();// destination program
		latestProgram = mtf.getLatestProgram();// latest version (results and latest start out the same);

		ProgramChangeSet resultChangeSet = mtf.getResultChangeSet();
		ProgramChangeSet myChangeSet = mtf.getPrivateChangeSet();
		mergeMgr = createMergeManager(resultChangeSet, myChangeSet);

		testMonitor.clearCancelled();
		final CountDownLatch started = new CountDownLatch(1);
		final CountDownLatch done = new CountDownLatch(1);
		Thread t = new Thread(() -> {
			try {
				started.countDown();
				mergeMgr.merge(testMonitor);
				done.countDown();
			}
			catch (CancelledException e) {
				// can't happen
			}
		});
		t.start();

		assertTrue("Merge never started",
			started.await(DEFAULT_WAIT_TIMEOUT, TimeUnit.MILLISECONDS));
		waitForSwing();

		window = getMergeWindow(done);

		if (doWait) {
			t.join();
		}
	}
Adapter for data type merge tests.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/AbstractDataTypeMergeTest.java