public static Project getProject(String directory, String name)
			throws IOException, LockException {

		ProjectManager pm = TestProjectManager.get();
		ProjectLocator url = new ProjectLocator(directory, name);

		File dir = new File(directory);
		if (!dir.isDirectory()) {
			throw new AssertException("Test directory does not exist: " + dir);
		}

		File projDir = url.getProjectDir();
		if (projDir.exists()) {
			try {
				return pm.openProject(url, true, false);
			}
			catch (NotFoundException e) {
				throw new RuntimeException("Bad project directory: " + projDir);
			}
			catch (NotOwnerException e) {
				// I suppose this can't happen since we are not using a shared project
			}
		}

		try {
			return pm.createProject(url, null, true);
		}
		catch (MalformedURLException e) {
			throw new IllegalArgumentException("Bad project name: " + name);
		}
	}
Open the project for the given directory and name.
If the project does not exist, create one. 
Only once instance of a given project may be open at any given
point in time.  Be sure to close the project if you will be
re-opening.
@param directory directory for the project
@param name name of the project
@return the project
@throws IOException if there was a problem creating the project
@throws LockException if the project is already open
@throws IllegalArgumentException if the name has illegal characters such that a URL could
not be created
Ghidra/Features/Base/src/main/java/ghidra/test/ProjectTestUtils.java