@Test
	public void testUndoRedoHexLongLong() throws Exception {
		env.showTool();
		addViews();

		Address addr = getAddr(0x01001003);
		ToggleDockingAction action =
			(ToggleDockingAction) getAction(plugin, "Enable/Disable Byteviewer Editing");
		ByteViewerComponent c = findComponent(panel, "Hex Long Long");
		panel.setCurrentView(c);

		runSwing(() -> {
			FieldLocation loc = getFieldLocation(addr);
			ByteViewerComponent currentComponent = panel.getCurrentComponent();
			currentComponent.setCursorPosition(loc.getIndex(), loc.getFieldNum(), loc.getRow(),
				loc.getCol());
			action.setSelected(true);
			action.actionPerformed(new DefaultActionContext());
		});
		byte value = program.getMemory().getByte(addr);
		runSwing(() -> {
			ByteViewerComponent currentComponent = panel.getCurrentComponent();
			FieldLocation loc = getFieldLocation(addr);
			KeyEvent ev =
				new KeyEvent(currentComponent, 0, new Date().getTime(), 0, KeyEvent.VK_A, 'a');
			currentComponent.keyPressed(ev, loc.getIndex(), loc.getFieldNum(), loc.getRow(),
				loc.getCol(), currentComponent.getCurrentField());
		});
		program.flushEvents();
		assertEquals((byte) 0xa0, memory.getByte(addr));

		undo(program);

		assertEquals(value, memory.getByte(addr));
		FieldLocation loc = getFieldLocation(addr);
		ByteField field = c.getField(loc.getIndex(), loc.getFieldNum());
		Color fg = field.getForeground();
		assertTrue(fg == null ||
			ByteViewerComponentProvider.CURSOR_NON_ACTIVE_COLOR == field.getForeground());

		redo(program);

		// field color should show edit color
		loc = getFieldLocation(addr);
		field = c.getField(loc.getIndex(), loc.getFieldNum());
		assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR, field.getForeground());

	}
Test editing in the Byte Viewer.
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin2Test.java