protected void checkAction(DockingActionIf action, boolean isValidContext, String caseName) {

		ActionContext programContext = getProgramContext();
		String addrStr = "<none>";
		if (programContext instanceof ListingActionContext) {
			Address addr = ((ListingActionContext) programContext).getLocation().getAddress();
			if (addr != null) {
				addrStr = addr.toString();
			}
		}

		boolean enabledForContext = action.isEnabledForContext(programContext);
		if (isValidContext != enabledForContext) {
			Msg.debug(this, "checkAction(): ");
			action.isEnabledForContext(programContext);
		}
		assertEquals(
			"Context is not in correct valid state. Context: actionName = " + action.getName() +
				", address=" + addrStr + " [case: " + caseName + "]",
			isValidContext, enabledForContext);
		return;
	}
Execute the specified DataPlugin action using the current program context.
Assertion failures will occur if action not found or is not enabled for the
current context.
@param name action name
@param waitForCompletion if true invocation will wait for action to complete
its execution in the swing thread, if false it will be scheduled and return immediately.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/data/AbstractDataActionTest.java