@Test
	public void testInstallThenUninstallThenReinstallWhenExtensionNameDoesntMatchFolder()
			throws Exception {

		// This tests a previous failure case where an extension could not be reinstalled if its
		// name did not match the folder it was installed into.  This could happen because the code
		// that installed the extension did not match the code to clear the 'mark for uninstall'
		// condition.

		String nameProperty = "ExtensionNamedFoo";
		File externalFolder = createExtensionWithMismatchingNamePropertyString(nameProperty);
		assertTrue(ExtensionInstaller.install(externalFolder));

		ExtensionDetails extension = assertExtensionInstalled(nameProperty);

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

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