@Test
	public void testEditOptionEditColor() throws Exception {
		// color for changed bytes
		env.showTool();
		addViews();

		runSwing(() -> {
			ByteViewerComponent c = panel.getCurrentComponent();
			FieldLocation loc = getFieldLocation(getAddr(0x01001000));
			c.setCursorPosition(loc.getIndex(), loc.getFieldNum(), 0, 0);
		});

		Options opt = tool.getOptions("ByteViewer");
		// change the color for Edit Color
		putColor(opt, ByteViewerComponentProvider.CHANGED_VALUE_COLOR_OPTION_NAME, Palette.GREEN);

		FieldLocation loc = getFieldLocation(getAddr(0x01001000));
		runSwing(() -> {
			ToggleDockingAction action =
				(ToggleDockingAction) getAction(plugin, "Enable/Disable Byteviewer Editing");
			action.setSelected(true);
			action.actionPerformed(new DefaultActionContext());

			ByteViewerComponent c = panel.getCurrentComponent();

			c.setCursorPosition(loc.getIndex(), loc.getFieldNum(), 0, 0);

			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();

		ByteViewerComponent c = panel.getCurrentComponent();
		ByteField field = c.getField(loc.getIndex(), loc.getFieldNum());
		assertColorsEqual(Palette.GREEN, field.getForeground());
	}
Test editing in the Byte Viewer.
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin2Test.java