void removeExternalFunctionLocation(ProgramDB program, String transactionDescription,
			String library, String label, String addressAsString) {
		int txId = program.startTransaction(transactionDescription);
		boolean commit = false;
		ExternalManager externalManager = program.getExternalManager();
		try {
			ExternalLocation externalLocation =
				externalManager.getUniqueExternalLocation(library, label);
			assertNotNull(externalLocation);
			if (!externalLocation.isFunction()) {
				Assert.fail(externalLocation.getLabel() + " is not a function.");
			}
			Symbol externalSymbol = externalLocation.getSymbol();
			boolean delete = externalSymbol.delete();
			assertTrue(delete);
			commit = true;

			Symbol s = getUniqueSymbol(program, library, program.getGlobalNamespace());
			if (s instanceof LibrarySymbol) {
				Symbol symbol = getUniqueSymbol(program, label, (Namespace) s.getObject());
				symbol.delete();
			}
			commit = true;
		}
		catch (Exception e) {
			Assert.fail(e.getMessage());
		}
		finally {
			program.endTransaction(txId, commit);
		}

		SymbolTable symbolTable = program.getSymbolTable();
		Symbol s = symbolTable.getLibrarySymbol(library);
		if (s instanceof LibrarySymbol) {
			Symbol symbol = getUniqueSymbol(program, label, (Namespace) s.getObject());
			assertNull(symbol);
		}

		assertTrue(externalManager.contains(library));
		ExternalLocation externalLocation =
			externalManager.getUniqueExternalLocation(library, label);
		assertNull(externalLocation);
		FunctionIterator externalFunctions = program.getFunctionManager().getExternalFunctions();
		assertEquals(false, externalFunctions.hasNext());
	}
@param program
@param transactionDescription
@param library
@param label
@param addressAsString
Ghidra/Features/Base/src/test.slow/java/ghidra/app/merge/listing/AbstractExternalMergerTest.java