@Test
	public void testProcessSelectionEvent() throws Exception {
		loadViews("Ascii", "Octal");

		ByteViewerComponent c = panel.getCurrentComponent();

		AddressSet set = new AddressSet();
		set.addRange(addr(0x01004178), addr(0x0100419b));
		set.addRange(addr(0x010041a8), addr(0x010041bc));
		ProgramSelection sel = new ProgramSelection(set);
		Plugin p = env.getPlugin(NavigationHistoryPlugin.class);
		p.firePluginEvent(new ProgramSelectionPluginEvent(p.getName(), sel, program));
		waitForSwing();

		ByteBlockSelection bsel = c.getViewerSelection();

		c = findComponent(panel, "Octal");
		assertTrue(byteBlockSelectionEquals(bsel, c.getViewerSelection()));
		c = findComponent(panel, "Ascii");
		assertTrue(byteBlockSelectionEquals(bsel, c.getViewerSelection()));

		ProgramSelection psel = cbPlugin.getCurrentSelection();

		bsel = panel.getViewerSelection();

		// convert bsel to an address set
		set = ((ProgramByteBlockSet) plugin.getProvider().getByteBlockSet()).getAddressSet(bsel);
		assertTrue(psel.hasSameAddresses(set));
	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java