@Test
	public void testOpenVersionWith() throws Exception {

		// create 3 versions of the program
		doCreateVersions();

		GTreeNode node = getNode(PROGRAM_A);
		selectNode(node);

		DockingActionIf historyAction = getAction("Show History");
		performAction(historyAction, getDomainFileActionContext(node), true);

		VersionHistoryDialog dialog = waitForDialogComponent(VersionHistoryDialog.class);

		GTable table = findComponent(dialog, GTable.class);
		runSwing(() -> table.selectRow(0));

		VersionHistoryPanel panel = findComponent(dialog, VersionHistoryPanel.class);
		VersionHistoryTableModel tm = panel.getVersionHistoryTableModel();
		Version version = runSwing(() -> tm.getVersionAt(0));

		Rectangle rect = table.getCellRect(0, 0, true);
		final MouseEvent event = new MouseEvent(table, MouseEvent.MOUSE_PRESSED,
			System.currentTimeMillis(), 0, rect.x, rect.y, 1, true);

		runSwing(() -> {
			MouseListener[] mls = table.getMouseListeners();
			for (final MouseListener ml : mls) {
				ml.mousePressed(event);
				if (event.isConsumed()) {
					break;
				}
			}
		});

		JPopupMenu popup = getPopupMenu();
		assertNotNull(popup);

		int n = popup.getComponentCount();
		for (int i = 0; i < n; i++) {
			Component comp = popup.getComponent(i);
			if (comp instanceof JMenu) {
				JMenu menu = (JMenu) comp;
				int nItems = menu.getItemCount();
				for (int j = 0; j < nItems; j++) {
					Component item = menu.getMenuComponent(j);
					if (item instanceof JMenuItem) {
						if (((JMenuItem) item).getText().equals("CodeBrowser")) {
							final ActionListener al = ((JMenuItem) item).getActionListeners()[0];
							runSwing(new Runnable() {
								@Override
								public void run() {
									al.actionPerformed(new ActionEvent(this, 0, null));
								}
							});
							break;
						}
					}
				}
			}
		}

		waitForSwing();

		List<PluginTool> tools = frontEnd.getTools();
		assertEquals(1, tools.size());

		DomainFile[] dfs = tools.get(0).getDomainFiles();
		assertEquals(1, dfs.length);

		assertTrue(dfs[0].isReadOnly());
		assertEquals(version.getVersion(), dfs[0].getVersion());

		runSwing(() -> dialog.close());

	}
Tests for version control (not multi user).
Ghidra/Test/IntegrationTest/src/test.slow/java/ghidra/framework/main/datatree/VersionControlAction1Test.java