@Test
	public void testMaskToggle() {

		// First get a cell and verify it has the correct starting value.
		InstructionTableDataObject cell21 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(1, 0);
		assertEquals(cell21.getData().trim(), "57");

		// Now mask it by getting the cell in the instruction table and changing its state.
		InstructionTableDataObject cell21Toggle =
			(InstructionTableDataObject) instructionTable.getModel().getValueAt(1, 1);
		cell21Toggle.setState(OperandState.MASKED, true);

		// Wait for the gui to finish updating.
		dialog.waitForCurrentTask();

		// Verify it has the correct masked value.
		assertEquals(cell21.getData().trim(), "[01010...]");

		// Now unmask it.
		cell21Toggle.setState(OperandState.NOT_MASKED, true);

		// Wait for the gui to finish updating.
		dialog.waitForCurrentTask();

		// And check that it's in good shape again.
		assertEquals(cell21.getData().trim(), "57");
	}
Test that toggling a cell causes the preview screen to show the
correct mask.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchTest.java