CodeGeneratorListener listener = createMock(CodeGeneratorListener.class);
Set<CodeGeneratorListener> listeners = newHashSet(listener);
ToolRunner toolRunner = createMock(ToolRunner.class);
Console console = createMock(Console.class);
expect(grammarResource.fileFrom(resource)).andReturn(file);
expect(optionsProvider.options(file)).andReturn(options);
listener.beforeProcess(file, options);