private void waitForApply(Window window, boolean enabled, int timeoutMS) throws Exception {

		JButton applyButton = findButtonByText(window, "Apply");
		assertNotNull(applyButton);
		waitForCondition(() -> applyButton.isEnabled() == enabled,
			"Failed waiting for Apply to be " + (enabled ? "enabled." : "disabled"));
	}
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