private void verifyAddressWithTableModels(Address instructionAddress, boolean fromConnected,
			boolean expectedSame) {
		ComponentProvider provider = fromConnected ? getCurrentComponentProviderFromPlugin()
				: getFirstDisconnectedProviderFromPlugin();

		JTextArea instructionText = (JTextArea) getInstanceField("instructionText", provider);
		JTable opTable = (JTable) getInstanceField("opTable", provider);

		// get the instruction address from each table model and make sure that
		// it is the same as the current instruction
		String stateString = expectedSame ? "is not" : "is";
		String text = instructionText.getText();

		String address = instructionAddress.toString(true);
		Pattern pattern = Pattern.compile("Address\\s*:\\s*" + address);
		Matcher matcher = pattern.matcher(text);
		boolean comparisonResult = matcher.find();

		// if the caller of this method expects the results to be NOT equal, 
		// then toggle the comparison result
		if (!expectedSame) {
			comparisonResult = !comparisonResult;
		}

		assertTrue("The address of the mnemonic table " + stateString +
			" the same as that of the current program instruction.", comparisonResult);

		Instruction opInstr = (Instruction) getInstanceField("instruction", opTable.getModel());
		comparisonResult = instructionAddress.equals(opInstr.getMinAddress());

		if (!expectedSame) {
			comparisonResult = !comparisonResult;
		}

		assertTrue("The address of the op table " + stateString +
			" the same as that of the current program instruction.", comparisonResult);
	}
Tests the addresses of the table models of the "Instruction Info" dialog.
The method will fail the current test if the result is not as 
expected by the caller of this method.  For example, if 
{@code expectedSame} is true, then the method expects the values to
be the same when compared with the given address and will fail if 
they are not.  If {@code expectedSame} is false, then the method will
fail if the test values are the same.

@param instructionAddress The address to compare against the address
       stored in the table model of the dialog.
@param expectedSame True means a match is expected; false means a 
       match is not expected.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/processors/ShowInstructionInfoPluginTest.java