private void waitForButtonReset(AbstractButton c, boolean selected) {

		if (c == null) {
			return;// not all merge buttons are always on the dialog
		}

		String state = selected ? "selected" : "de-selected";
		waitForCondition(() -> c.isSelected() == selected || !c.isShowing(),
			"Timed-out waiting for component to become " + state + ": " +
				c.getClass().getSimpleName());
	}
Adapter for data type merge tests.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/datatypes/AbstractDataTypeMergeTest.java