@Test
	public void testAddRemoveViews() throws Exception {
		ByteViewerOptionsDialog dialog = launchByteViewerOptions();
		setViewSelected(dialog, "Ascii", true);
		setViewSelected(dialog, "Octal", true);
		pressButtonByText(dialog.getComponent(), "OK");

		assertEquals(3, panel.getNumberOfViews());

		List<String> names = panel.getViewNamesInDisplayOrder();
		assertEquals(3, names.size());
		Set<String> viewNames = new HashSet<>(names);
		assertTrue(viewNames.contains("Hex"));
		assertTrue(viewNames.contains("Octal"));
		assertTrue(viewNames.contains("Ascii"));

		// verify cursor position is the same across all views
		// verify the view is visible
		ByteViewerComponent bc = findComponent(panel, "Hex");
		assertTrue(bc.isVisible());
		ByteBlockInfo bbInfo = bc.getViewerCursorLocation();

		bc = findComponent(panel, "Ascii");
		assertTrue(bc.isVisible());
		assertEquals(bbInfo, bc.getViewerCursorLocation());

		bc = findComponent(panel, "Octal");
		assertTrue(bc.isVisible());
		assertEquals(bbInfo, bc.getViewerCursorLocation());

		dialog = launchByteViewerOptions();
		setViewSelected(dialog, "Ascii", false);
		setViewSelected(dialog, "Hex", false);
		pressButtonByText(dialog.getComponent(), "OK");

		assertEquals(1, panel.getNumberOfViews());

		names = panel.getViewNamesInDisplayOrder();
		assertEquals(1, names.size());
		assertEquals("Octal", names.get(0));

	}
Basic tests for the byte view plugin
Ghidra/Features/ByteViewer/src/test.slow/java/ghidra/app/plugin/core/byteviewer/ByteViewerPlugin1Test.java