@Test
	public void testCleanupUninstalledExtions_SomeExtensionMarkedForUninstall() throws Exception {

		List<File> extensionFolders = createTwoExternalExtensionsInFolder();
		assertTrue(ExtensionInstaller.install(extensionFolders.get(0)));
		assertTrue(ExtensionInstaller.install(extensionFolders.get(1)));

		Set<ExtensionDetails> extensions = ExtensionUtils.getInstalledExtensions();
		assertEquals(extensions.size(), 2);

		Iterator<ExtensionDetails> it = extensions.iterator();
		ExtensionDetails extensionToRemove = it.next();
		ExtensionDetails extensionToKeep = it.next();
		assertTrue(extensionToRemove.isInstalled());

		extensionToRemove.markForUninstall();
		checkMarkForUninstall(extensionToRemove);
		assertFalse(extensionToRemove.isInstalled());

		// Also test that we can clear the uninstall marker
		ExtensionUtils.initializeExtensions();
		assertExtensionInstalled(extensionToKeep.getName());
	}
Tests for the {@link ExtensionInstaller} class.
Ghidra/Framework/Project/src/test/java/ghidra/framework/project/extensions/ExtensionInstallerTest.java