Grammar grammar = createMock(Grammar.class);
expect(grammar.eResource()).andReturn(resource);
Rule rule = createMock(Rule.class);
expect(rule.getName()).andReturn(ruleName);
expect(rule.eContainer()).andReturn(grammar);
expect(workspaceRoot.getFile(Path.fromOSString("/project/G.g4"))).andReturn(file);
expect(optionsProvider.options(file)).andReturn(options);
List<String> command = Lists.newArrayList("java", "-cp",