@Test
	public void testImportLargeGrammar(@TempDir Path tempDir) throws IOException {
		String tempDirPath = tempDir.toString();
		String slave = load("Java.g4");
		String master =
			"grammar NewJava;\n" +
			"import Java;\n";

		FileUtils.mkdir(tempDirPath);
		writeFile(tempDirPath, "Java.g4", slave);
		ExecutedState executedState = execParser("NewJava.g4", master,
				"NewJavaParser", "NewJavaLexer", "compilationUnit", "package Foo;",
				debug, tempDir);
		assertEquals("", executedState.output);
		assertEquals("", executedState.errors);
	}
This is a regression test for antlr/antlr4#670 "exception when importing
grammar".  I think this one always worked but I found that a different
Java grammar caused an error and so I made the testImportLeftRecursiveGrammar() test below.
https://github.com/antlr/antlr4/issues/670
tool-testsuite/test/org/antlr/v4/test/tool/TestCompositeGrammars.java