public TraceThread getOrAddThread(String name, long creationSnap) {
		DBTraceThreadManager manager = trace.getThreadManager();
		Collection<? extends TraceThread> threads = manager.getThreadsByPath(name);
		if (threads != null && !threads.isEmpty()) {
			return threads.iterator().next();
		}
		try {
			return manager.createThread(name, creationSnap);
		}
		catch (DuplicateNameException e) {
			throw new AssertionError(e);
		}
	}
Ensure the given thread exists and retrieve it

@param name the thread's name
@param creationSnap the snap where the thread must exist
@return the thread
Ghidra/Debug/Framework-TraceModeling/src/test/java/ghidra/trace/database/ToyDBTraceBuilder.java