@Test
	public void testEditsInOtherViews() throws Exception {
		// verify changed bytes show up in red in other views
		env.showTool();
		addViews();

		GoToService goToService = tool.getService(GoToService.class);
		goToService.goTo(new ProgramLocation(program, getAddr(01001530)));
		waitForSwing();

		Address addr = getAddr(0x01001530);
		txSwing(() -> {
			StructureDataType dt = new StructureDataType("test", 0);
			for (int i = 0; i < 7; i++) {
				dt.add(new ByteDataType());
			}
			listing.createData(addr, dt, dt.getLength());
		});

		ToggleDockingAction action =
			(ToggleDockingAction) getAction(plugin, "Enable/Disable Byteviewer Editing");
		runSwing(() -> {
			action.setSelected(true);
			action.actionPerformed(new DefaultActionContext());
		});
		ByteViewerComponent c = panel.getCurrentComponent();

		runSwing(() -> {
			FieldLocation loc = getFieldLocation(addr);
			KeyEvent ev = new KeyEvent(c, 0, new Date().getTime(), 0, KeyEvent.VK_A, 'a');
			c.keyPressed(ev, loc.getIndex(), loc.getFieldNum(), loc.getRow(), loc.getCol(),
				c.getCurrentField());
		});
		program.flushEvents();
		waitForSwing();

		assertEquals((byte) 0xa0, program.getMemory().getByte(addr));
		FieldLocation loc = getFieldLocation(addr);
		ByteField field = c.getField(loc.getIndex(), loc.getFieldNum());
		assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR, field.getForeground());

		ByteViewerComponent asciiC = findComponent(panel, "Ascii");
		runSwing(() -> panel.setCurrentView(asciiC));

		loc = getFieldLocation(addr);
		field = asciiC.getField(loc.getIndex(), loc.getFieldNum());
		assertEquals(ByteViewerComponentProvider.CHANGED_VALUE_COLOR, field.getForeground());

		ByteViewerComponent hexIntC = findComponent(panel, "Hex Integer");
		runSwing(() -> panel.setCurrentView(hexIntC));

		loc = getFieldLocation(addr);
		field = asciiC.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