protected ResourceFile createScriptWithFields(boolean staticFields) throws Exception {
		ResourceFile newScriptFile = createTempScriptFile("LocalVariableScript");
		String filename = newScriptFile.getName();
		String className = filename.replaceAll("\\.java", "");

		//@formatter:off
		String field = staticFields ?
				"public static int counter = 0;"           :
					"public int counter = 0;";

		String newScript =
				"import ghidra.app.script.GhidraScript;\n\n" +

		    "public class "+className+" extends GhidraScript {\n\n" +

				 field +

				 "    @Override\n" +
				 "    public void run() throws Exception {\n" +

		    	"        counter++;\n" +
		    	"        println(\"*\" + counter + \"*\");\n" +
		    	"    }\n" +
		    	"}\n\n";
		//@formatter:on

		writeStringToFile(newScriptFile, newScript);

		return newScriptFile;
	}
Unusual Code Alert!: the test runs faster than the writing of the class file
and the File object's modified granularity is not low enough such that sometimes
the code will not recompile a script that we have changed, as it will not do
so if it thinks the file has not changed.

@param file the file to update
Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/script/AbstractGhidraScriptMgrPluginTest.java