public static ArchiveNode checkOutArchive(String archiveName,
			final DataTypeManagerPlugin plugin) throws Exception {

		String archiveNodeName = trimFullArchiveName(archiveName);
		GTree tree = plugin.getProvider().getGTree();
		GTreeNode rootNode = tree.getModelRoot();
		ArchiveNode archiveNode = (ArchiveNode) rootNode.getChild(archiveNodeName);
		if (archiveNode == null) {
			throw new IllegalArgumentException(
				"Unable to locate an archive by the name: " + archiveNodeName);
		}

		ArchiveUtils.lockArchive((FileArchive) archiveNode.getArchive());

		// checking out the archive causes the trees nodes to be recreated
		return (ArchiveNode) rootNode.getChild(archiveNodeName);
	}
Checks out the archive by the given name.

@param archiveName The name of the archive to open.  This must be a child off of the root node.
@param plugin The plugin that contains the tree and actions under test
@return The archive node associated with the open archive
@throws Exception If there is any problem finding or opening the archive for the given name
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datamgr/DataTypeTestUtils.java