protected String changeScriptCategory(ResourceFile script, String newCategory)
			throws IOException {
		String contents = readFileContents(script);

		// Format:
		//@category name
		contents = contents.replaceFirst("//@category \\w+", "//@category " + newCategory);

		writeStringToFile(script, contents);

		//
		// Unusual Code: the ScriptManager uses last modified to know when to refresh.  Our test
		//               runs fast enough that the resolution of lastModified is not tripped, so
		//               manually force a change.
		//
		File file = script.getFile(false);
		long lastModified = file.lastModified();
		long inTheFuture = 10000 + System.currentTimeMillis();
		file.setLastModified(lastModified + inTheFuture);

		return newCategory;
	}
Run the last script by pressing the last script button and return output.

@param taskName name for the task listener
@return script output written to the console
@throws Exception on failure, e.g. timeout
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java