LexerRule starRule = createMock(LexerRule.class);
expect(starRule.getName()).andReturn("*");
starRule.setName("*");
LangFactory langFactory = createMock(LangFactory.class);
expect(langFactory.createLexerRule()).andReturn(plusRule);
expect(langFactory.createLexerRule()).andReturn(starRule);
URI resourceURI = URI.createURI("platform:/resource/project/G.g4");
Resource resource = createMock(Resource.class);
expect(resource.getURI()).andReturn(resourceURI);