private void waitForMergeToStart(int timeoutMS, CountDownLatch startLatch,
			CountDownLatch endLatch) throws Exception {

		try {
			assertTrue("Merge did not start in " + timeoutMS + "ms",
				startLatch.await(timeoutMS, TimeUnit.MILLISECONDS));
		}
		catch (InterruptedException e) {
			fail("Interrupted waiting for merge to start");
		}

		// now wait for the merge tool to appear or for the entire merge process to have
		// ended
		waitForCondition(() -> {
			mergeTool = mergeMgr.getMergeTool();
			boolean ended = endLatch.getCount() == 0;
			return mergeTool != null || ended;
		});
	}
Starts the merge and sets "window" to the merge dialog.
@param decision the conflict decision
@param waitForVisibleWindow true to wait
@throws Exception if the sleep for the automatic merge was interrupted.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/AbstractListingMergeManagerTest.java