@Test
	public void testTabUpdatesOnProgramChange() throws Exception {
		ProgramBuilder builder = new ProgramBuilder("notepad", ProgramBuilder._TOY);
		builder.createMemory("test", "0x0", 100);
		Program p = doOpenProgram(builder.getProgram(), true);
		p.setTemporary(false); // we need to be notified of changes 
		// select notepad
		selectTab(p);
		int transactionID = p.startTransaction("test");
		try {
			SymbolTable symTable = p.getSymbolTable();
			symTable.createLabel(builder.addr("0x10"), "fred", SourceType.USER_DEFINED);
		}
		finally {
			p.endTransaction(transactionID, true);
		}
		p.flushEvents();
		runSwing(() -> panel.refreshTab(p));

		JPanel tab = panel.getTab(p);
		JLabel label = (JLabel) findComponentByName(tab, "Tab Label");
		assertTrue(label.getText().startsWith("*"));
	}
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