@SuppressWarnings("unchecked")
	@Test
	public void testTabUpdate() throws Exception {
		Program p = openDummyProgram("login", true);

		// select second tab (the "login" program)
		panel = findComponent(tool.getToolFrame(), GTabPanel.class);

		// don't let focus issues hide the popup list
		panel.setIgnoreFocus(true);

		selectTab(p);
		assertEquals(p, getSelectedTabValue());

		addComment(p);

		String oldName = p.getName();
		String newName = "myNewLogin";
		renameProgramFile(p, newName);
		ArrayList<DomainObjectChangeRecord> changeRecs = new ArrayList<>();
		changeRecs
				.add(new DomainObjectChangeRecord(DomainObjectEvent.RENAMED, oldName, p.getName()));
		DomainObjectChangedEvent ev = new DomainObjectChangedEvent(p, changeRecs);
		runSwing(() -> env.getPlugin(MultiTabPlugin.class).domainObjectChanged(ev));

		// Check the name on the tab and in the tooltip.
		JPanel tabPanel = getTabPanel(p);
		JLabel label = (JLabel) findComponentByName(tabPanel, "Tab Label");
		assertEquals("*" + newName + " [Read-Only]", label.getText());
		assertTrue(label.getToolTipText().endsWith("/" + newName + " [Read-Only]*"));
	}
Tests for the plugin that manages the tab for multiple open programs.
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/progmgr/MultiTabPluginTest.java