@Test
	public void testOpenVersion() 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);

		VersionHistoryPanel panel = findComponent(dialog, VersionHistoryPanel.class);

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

		runSwing(() -> table.setRowSelectionInterval(0, 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 JMenuItem) {
				if (((JMenuItem) comp).getText().equals("Open in Default Tool")) {
					final ActionListener al = ((JMenuItem) comp).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