@Test
	public void testHexView() {

		setToggleButtonSelected(component, "Hex View Button", true);

		// Wait for the button select to finish; the select fires an event that causes
		// the preview panel to change to hex.
		dialog.waitForCurrentTask();

		// Now grab the preview panel content and check again.
		InstructionTableDataObject cell00 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(0, 0);
		assertEquals(cell00.getData().trim(), "47");

		InstructionTableDataObject cell10 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(1, 0);
		assertEquals(cell10.getData().trim(), "57");

		InstructionTableDataObject cell20 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(2, 0);
		assertEquals(cell20.getData().trim(), "8d 45 08");

		InstructionTableDataObject cell30 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(3, 0);
		assertEquals(cell30.getData().trim(), "50");

		InstructionTableDataObject cell40 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(4, 0);
		assertEquals(cell40.getData().trim(), "ff 75 0c");

		InstructionTableDataObject cell50 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(5, 0);
		assertEquals(cell50.getData().trim(), "e8 84 2c 00 00");

		InstructionTableDataObject cell60 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(6, 0);
		assertEquals(cell60.getData().trim(), "83 c4 0c");

		InstructionTableDataObject cell70 =
			(InstructionTableDataObject) previewTable.getModel().getValueAt(7, 0);
		assertEquals(cell70.getData().trim(), "89 45 fc");
	}
Tests that the hex view button correctly switches the preview table to hex, and that
the hex is formatted correctly when masking.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/instructionsearch/InstructionSearchTest.java